# HG changeset patch # User Stephen J. Turnbull # Date 1224938446 -32400 # Node ID 66411359ce4eec5b18a399cc00452e8098a7c810 # Parent dd12adb12b8f72dd2fd2b9effb97cde3277ce750# Parent 71bf2c5667ba4dfece70c13c5f9fd249474f3652 Merge in ac-fix-2008-10-25. Fix up ChangeLogs. diff -r 71bf2c5667ba -r 66411359ce4e .hgignore --- a/.hgignore Sat Oct 25 20:35:36 2008 +0900 +++ b/.hgignore Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,55 @@ (^|/)CVS($|/) (^|/)\.hg($|/) (^|/)\.hgtags($|/) +\.o$ +\.elc$ +~$ +\.orig$ +\.rej$ +(^|/)\#[^/]*\#$ +(^|/)\.\#[^/]*$ +info/.*\.info(-[0-9]+)?$ +^GNUmakefile$ +^Installation$ +^Makefile$ +^Makefile\.in$ +^autom4te\.cache +^config\.(log|status)$ +^lib-src/DOC$ +^lib-src/(GNUmakefile|Makefile(\.in)?)$ +^lib-src/config\.values$ +^lib-src/(b2m|ctags|cvtmail|digest-doc|ellcc|etags|fakemail|gnuclient|gnuserv|hexl|insert-data-in-exec|make-docfile|make-dump-id|make-path|mmencode|movemail|ootags|profile|sorted-doc|wakeup|yow)$ +^lib-src/ellcc\.h$ +^lisp/(auto-autoloads|custom-load|finder-inf)\.el$ +^lisp/mule/(auto-autoloads|custom-load)\.el$ +^lwlib/(GNUmakefile|Makefile(\.in)?)$ +^lwlib/liblw\.a$ +^lwlib/config\.h$ +^modules/auto-autoloads\.el$ +^modules/ldap/(GNUmakefile|Makefile(\.in)?)$ +^modules/ldap/eldap\.ell$ +^modules/ldap/eldap_i\.c$ +^(xemacs|mule)-packages +^etc/PROBLEMS$ +^src/(.dbxrc|.gdbinit)(\.in)?$ +^src/(GNUmakefile|Makefile(\.in)?)$ +^src/NEEDTODUMP$ +^src/config\.h$ +^src/dump-id\.c$ +^src/dump-size$ +^src/paths\.h$ +^src/sheap-adjust\.h$ +^src/temacs$ +^src/xemacs$ +^src/xemacs\.def(\.in)?$ +^src/xemacs\.dmp$ +^src/Emacs\.ad\.h$ +^etc/bundled-packages/.*\.tar\.gz$ +^lib-src/(etags|hexl|i|make-docfile|make-dump-id|minitar|mmencode|movemail|sorted-doc|wakeup|winclient)\.(exe|exe\.manifest|pdb)$ +\.obj$ +^nt/obj +^nt/config.inc +^src/REBUILD_AUTOLOADS$ +^src/(temacs|xemacs)\.(exe|exe\.manifest|pdb|map|bsc)$ +^TAGS$ +^version\.sh$ \ No newline at end of file diff -r 71bf2c5667ba -r 66411359ce4e .hgtags --- a/.hgtags Sat Oct 25 20:35:36 2008 +0900 +++ b/.hgtags Sat Oct 25 21:40:46 2008 +0900 @@ -235,3 +235,4 @@ 223736d75acb5265cfd9352497e8483d787d8eab r21-2-45 0784d089fdc93fb58040b6efbec55cd4fdf650c2 r21-2-46 5aa1854ad5374fa936e99e22e7b1242097292f16 r21-2-47 +1af222c7586991f690ea06d1b8c75fb5a6a0a352 r21-5-28 diff -r 71bf2c5667ba -r 66411359ce4e ChangeLog --- a/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -2,6 +2,144 @@ * configure.ac (xemacs_cc_cc_mismatch): Improve g++ detection. +2008-08-03 Mats Lidell + + * configure.ac: Fix typo xft_gauge to xft_gauges + + * configure.ac (XE_COMPLEX_ARG): Use different defaults for + with-xft and without-xft. + +2008-07-06 Ville Skyttä + + * configure.ac (xe_fst): + New, to replace m4_fst which disappeared in autoconf 2.62 (#370). + (XE_EXPAND_COMPLEX_OPTIONS): Use xe_fst. + +2008-05-12 Michael Sperber + + * configure.ac: + A number of the checks that tried to determine whether an explicit + path was specified were wrong. + Also, add an AC_SUBST for INFOPATH. + +2008-05-07 Aidan Kehoe + + * configure.ac (XE_EXPAND_VARIABLE): Call AC_SUBST on + SHEBANG_PATHNAME, as suggested by Michael Sperber in + y9ly7aj1wfc.fsf@deinprogramm.de. + * Makefile.in.in: Regenerate. + * configure: Ditto. + +2008-01-20 Aidan Kehoe + + * Makefile.in.in (SHEBANG_PROGNAME): + New variable; a symbol link to the XEmacs binary to tell it it + should read a script from stdin. + * configure.ac (XE_EXPAND_VARIABLE): + Set SHEBANG_PROGNAME. + * configure: + Regenerate. + +2008-04-01 Andreas Schwab + + Thanks to Mike Fabian for posting a patch to the mainline, to Martin + Buchholz for writing the ChangeLog, and to Aidan Kehoe for finding + the 2003-01-27 ChangeLog. Tested against Xaw3d. -- stephen + + * configure.ac (athena_3d): + AC_CHECK_LIB must always take a function as + argument, never a global variable. Some linkers can tell the + difference. So change: + threeDClassRec ==> XawSme3dComputeTopShadowRGB + +2008-02-15 Marcus Crestani + + * configure.ac: Look for all x86 machines to determine which write + barrier to use on MacOSX. + * configure : Rebuild. + +2008-02-12 Jerry James + + * install.sh: Rename to install-sh and update to latest FSF version. + +2008-01-25 Stephen J. Turnbull + + * configure.ac (--with-database): 'gnudbm' -> 'gdbm' in docstrings. + +2008-01-25 Michael Sperber + + * Makefile.in.in: + * configure.ac: + * version.sh.in: Use Mercurial tip hash to identify version + instead of old CVS method. + +2008-01-17 Aidan Kehoe + + * configure.ac: + If using a version of the gdbm library that sticks dbm_open in + libgdbm_compat.so, also link to that library. + Correct a thinko with DBM version 4 checks. Both from Hans de + Graaff, in + http://mid.gmane.org/20050812092756.6850.qmail@graaff.xs4all.nl + and + http://mid.gmane.org/pan.2007.06.24.10.10.57@gentoo.org; thank you + Hans! + * configure: + Regenerate. + +2008-01-01 Stephen J. Turnbull + + * Makefile.in.in (mkpkgdir): Fix incorrect comment convention. + +2007-12-26 Stephen J. Turnbull + + * Makefile.in.in (mkpkgdir): Ensure only one late package directory. + +2007-12-26 Stephen J. Turnbull + + * Makefile.in.in (check-available-packages): Say where to install. + (mkpkgdir): + +2007-12-23 Stephen J. Turnbull + + * Makefile.in.in (mkpkgdir): + (check-available-packages): + (install-bootstrap-packages): + (install-nonmule-packages): + (install-all-packages): + New targets supporting bundled packages. + + * .hgignore: Ignore tarballs in etc/bundled-packages/. + +2007-12-08 Jerry James + + * config.guess: + * config.sub: Sync with the latest upstream versions. + +2007-12-12 Aidan Kehoe + + * configure.ac : + Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval. + * configure : + Rebuild. + +2007-08-27 Mike Sperber + + * configure.ac: Try to use pkg-config for finding Xft includes and + libraries. If that fails, search also in /usr/local. + +2007-08-12 Mike Sperber + + * Makefile.in.in (datarootdir): Add. + * configure.ac (infodir): Now in terms of $(datarootdir). + (mandir): Ditto, making it usually point to $(prefix)/share/man, + conformant with the GNU Coding Standards. + +2007-07-31 Mike Sperber + + * configure.ac: Don't divert `share' to `lib' for datadir. + Also, define AC_DATAROOTDIR_CHECKED to shut up autoconf. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. @@ -57,9 +195,9 @@ * configure.ac: Check for u_int*_t typedefs. -2006-12-06 Dr. Volker Zell - - * configure.ac: Avoid using Motif for cygwin. +2006-12-06 Dr. Volker Zell + + * configure.ac: Avoid using Motif for cygwin. 2006-11-23 Mike Sperber @@ -68,11 +206,11 @@ are user-defined. Use XE_EPXAND_VARIABLE macro created for this purpose where applicable. -2006-12-07 Rick Rankin +2006-12-07 Rick Rankin * configure.ac: Add new library name for cygwin's xpm. -2006-12-07 Rick Rankin +2006-12-07 Rick Rankin * configure.ac: Add new library name for cygwin's xpm. @@ -170,7 +308,7 @@ Update the Great Mule Merge placeholders to point to Internals Manual node "The Great Mule Merge of March 2002". N.B. Self-referencing log entries were *not* added to other logs. - + 2006-03-30 Jerry James * configure.ac: Fix for -Kalloca detection, also broken by the @@ -227,7 +365,7 @@ 2005-11-25 Mike Sperber - * CHANGES-beta: + * CHANGES-beta: * configure.ac: Zap --with-package-prefix; instead, add --with-user-packages/--with-early-packages, --with-system-packages/--with-late-packages, and @@ -247,7 +385,7 @@ * configure.ac: Three typos fixed. -2005-12-13 Mike Sperber +2005-12-13 Mike Sperber * configure.ac: Move the checks for the Xft-associated library out of a conditional. @@ -404,7 +542,7 @@ (--enable-dialogs): (--enable-widgets): Fix `eval "$FEATURE=\"$val\"" bug. - + 2005-01-29 Stephen J. Turnbull * INSTALL (CONFIGURATION OPTIONS): @@ -440,7 +578,7 @@ 2005-11-21 Marcus Crestani Incremental Garbage Collector - + * configure.ac: Add newgc option; if newgc, turn on kkcc and mc-alloc. Add checks for write barrier, determine which write barrier to use. Add vdb option to override write barrier @@ -1010,7 +1148,7 @@ * configure.in: Remove detection of GNU DLD. * configure: Regenerate. -2003-09-20 Rodney Sparapani +2003-09-20 Rodney Sparapani * PROBLEMS: Propose bash as an alternative to buggy Solaris /bin/sh. @@ -1284,7 +1422,7 @@ * etc/photos/golubev.png, etc/photos/golubevm.png: New. -2003-01-12 Mike Sperber +2003-01-12 Mike Sperber * configure.in: Check for strupr and strlwr. @@ -1501,7 +1639,7 @@ * XEmacs 21.5.8 "broccoli" is released. -2002-07-09 Mike Sperber +2002-07-09 Mike Sperber * configure.usage: * configure.in: Add --use-kkcc option for new GC algorithms. @@ -1514,7 +1652,7 @@ * PROBLEMS: Add two basic configuration questions. -2002-07-08 Mike Sperber +2002-07-08 Mike Sperber * configure.in: Test for wchar.h. @@ -1966,12 +2104,12 @@ * Makefile.in.in (finder): remove autoload targets. -2001-04-26 Malcolm Purvis +2001-04-26 Malcolm Purvis * configure.in: Check gtk version validity only when gtk-config exists. -2001-05-09 Martin Buchholz +2001-05-09 Martin Buchholz * XEmacs 21.5.1 "anise" is released. @@ -2003,7 +2141,7 @@ * PROBLEMS (Problems with running XEmacs): Document TMPDIR lossage in gnuserv/gnuclient. -2001-03-21 Martin Buchholz +2001-03-21 Martin Buchholz * XEmacs 21.2.46 "Urania" is released. @@ -2044,7 +2182,7 @@ * configure.in: with_netinstall is a new option. Default to off. -2001-02-23 Martin Buchholz +2001-02-23 Martin Buchholz * XEmacs 21.2.45 "Thelxepeia" is released. @@ -2065,11 +2203,11 @@ Combined into one simpler test for utime. Add explicit check for utimes, if utime not found. -2001-02-08 Martin Buchholz +2001-02-08 Martin Buchholz * XEmacs 21.2.44 "Thalia" is released. -2001-01-16 Mike Sperber +2001-01-16 Mike Sperber * configure.in: Remove bogus path variable definitions. Reflect the fact that specifying --datadir also affects docdir and @@ -2093,7 +2231,7 @@ * config.sub: Upgrade to offical version 2001-01-12. * config.guess: Upgrade to offical version 2001-01-17. -2001-01-26 Martin Buchholz +2001-01-26 Martin Buchholz * XEmacs 21.2.43 "Terspichore" is released. @@ -2105,7 +2243,7 @@ * README.packages: Update. -2001-01-20 Martin Buchholz +2001-01-20 Martin Buchholz * XEmacs 21.2.42 "Poseidon" is released. @@ -2127,7 +2265,7 @@ * NEWS: document the modeline horizontal scrolling feature. -2001-01-17 Martin Buchholz +2001-01-17 Martin Buchholz * XEmacs 21.2.41 "Polyhymnia" is released. @@ -2149,7 +2287,7 @@ * configure.in: allow --with-widgets=msw -2001-01-08 Martin Buchholz +2001-01-08 Martin Buchholz * XEmacs 21.2.40 is released. @@ -2162,18 +2300,18 @@ * PROBLEMS (Linux): document Mandrake policy, how to get Meta on Alt, and getaddrinfo() blocking trying to get localhost's CNAME. -2000-07-20 Kazuyuki IENAGA +2000-07-20 Kazuyuki IENAGA * configure.in: use input-method-xlib.o for USE_XFONTSET instead of input-method-xfs.o. * configure: ditto -2000-12-31 Martin Buchholz +2000-12-31 Martin Buchholz * XEmacs 21.2.39 is released. -2000-02-02 Daiki Ueno +2000-02-02 Daiki Ueno * configure.in: Added check if the berkdb has db_create or not. @@ -2187,7 +2325,7 @@ * netinstall: new net installer for MS-Windows. -2000-12-05 Martin Buchholz +2000-12-05 Martin Buchholz * XEmacs 21.2.38 is released. @@ -2199,7 +2337,7 @@ * configure.in: Autodetect elf.h. -2000-11-14 Martin Buchholz +2000-11-14 Martin Buchholz * XEmacs 21.2.37 is released. @@ -2240,7 +2378,7 @@ * configure.in: Pretend that DEC OSF >= 5 is really DEC OSF 4. -2000-10-04 Martin Buchholz +2000-10-04 Martin Buchholz * XEmacs 21.2.36 is released. @@ -2314,7 +2452,7 @@ * Makefile.in.in (configure): all-elcs target now uses update-elc-2.el not update-elc.sh -2000-07-19 Martin Buchholz +2000-07-19 Martin Buchholz * XEmacs 21.2.35 is released. @@ -2428,7 +2566,7 @@ * configure.in: Clean up configure support for cygwin and mingw. -2000-06-27 Darryl Okahata +2000-06-27 Darryl Okahata * PROBLEMS: Document broken native audio for recent patches and releases of HP-UX. @@ -2446,7 +2584,7 @@ * config.guess: New version from GNU config archive. * config.sub: Likewise. -2000-05-28 Martin Buchholz +2000-05-28 Martin Buchholz * XEmacs 21.2.34 is released. @@ -2460,7 +2598,7 @@ * configure.in: Remove lockdir. -2000-05-01 Martin Buchholz +2000-05-01 Martin Buchholz * XEmacs 21.2.33 is released. @@ -2528,7 +2666,7 @@ * configure.in: add error_check_glyphs. -2000-03-20 Martin Buchholz +2000-03-20 Martin Buchholz * XEmacs 21.2.32 is released. @@ -2560,11 +2698,11 @@ * 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 +2000-02-23 Martin Buchholz * XEmacs 21.2.31 is released. -2000-02-21 Martin Buchholz +2000-02-21 Martin Buchholz * XEmacs 21.2.30 is released. @@ -2598,7 +2736,7 @@ * configure.in: Test for arm simply using arm* instead of arm-* -2000-02-16 Martin Buchholz +2000-02-16 Martin Buchholz * XEmacs 21.2.29 is released. @@ -2637,11 +2775,11 @@ * configure.in: check for XConvertCase. -2000-02-07 Martin Buchholz +2000-02-07 Martin Buchholz * XEmacs 21.2.28 is released. -2000-01-27 URA Hiroshi +2000-01-27 URA Hiroshi * configure.in: added getaddrinfo and getnameinfo to AC_FUNC. @@ -2688,7 +2826,7 @@ * configure.in: Use /etc/ld.so.conf at link-time, if available. -2000-01-18 Martin Buchholz +2000-01-18 Martin Buchholz * XEmacs 21.2.27 is released. @@ -2711,7 +2849,7 @@ - rename src/gdbinit to src/.gdbinit, so that gdb can find it. - Less verbose messages when creating .sbinit, .gdbinit, TAGS. -2000-01-07 Marcus Thiessel +2000-01-07 Marcus Thiessel * config.sub: Upgrade to 1.169, imported from autoconf's CVS * config.guess: Upgrade to 1.158, imported from autoconf's CVS @@ -2727,11 +2865,11 @@ * configure.in (Installation): Report which Athena header/library combo is being used. -1999-12-31 Martin Buchholz +1999-12-31 Martin Buchholz * XEmacs 21.2.26 is released. -1999-12-24 Martin Buchholz +1999-12-24 Martin Buchholz * XEmacs 21.2.25 is released. @@ -2744,7 +2882,7 @@ * configure.in: Oops. xpm doesn't actually depend on X11. I got confused by the name (like others get confused by `xemacs'?) -1999-12-14 Martin Buchholz +1999-12-14 Martin Buchholz * XEmacs 21.2.24 is released. @@ -2770,7 +2908,7 @@ * configure.in (--with-sound): Variable with_esd was mispelled. -1999-12-07 Martin Buchholz +1999-12-07 Martin Buchholz * XEmacs 21.2.23 is released. @@ -2796,11 +2934,11 @@ * Makefile.in.in (beta): `make beta' should rebuild info. -1999-11-29 XEmacs Build Bot +1999-11-29 XEmacs Build Bot * XEmacs 21.2.22 is released -1999-11-28 Martin Buchholz +1999-11-28 Martin Buchholz * XEmacs 21.2.21 is released. @@ -2851,11 +2989,11 @@ /usr/ccs/bin/ld: illegal option -- W -1999-11-10 XEmacs Build Bot +1999-11-10 XEmacs Build Bot * XEmacs 21.2.20 is released -1999-09-21 Martin Buchholz +1999-09-21 Martin Buchholz * configure.in: Autodetect Unix98 PTY 1999-08-30 Robert Pluim @@ -2934,7 +3072,7 @@ * configure.in: fix definitions of widget defines with various toolkit options. -1999-07-30 XEmacs Build Bot +1999-07-30 XEmacs Build Bot * XEmacs 21.2.19 is released @@ -2988,7 +3126,7 @@ * InfoDock 4.0.8 is released -1999-07-13 XEmacs Build Bot +1999-07-13 XEmacs Build Bot * XEmacs 21.2.18 is released @@ -3028,7 +3166,7 @@ * Makefile.in (docdir): Added variable for custom DOC directory. -1999-06-22 XEmacs Build Bot +1999-06-22 XEmacs Build Bot * XEmacs 21.2.17 is released @@ -3039,7 +3177,7 @@ Test the presence of a variety of LDAP API functions which were formerly assumed to be present according to dubious heuristics -1999-06-11 XEmacs Build Bot +1999-06-11 XEmacs Build Bot * XEmacs 21.2.16 is released @@ -3048,7 +3186,7 @@ * configure.in (CPP): Correct test for locating $site_prefix include directories. -1999-06-04 XEmacs Build Bot +1999-06-04 XEmacs Build Bot * XEmacs 21.2.15 is released @@ -3089,7 +3227,7 @@ * configure.in (quoted_arguments): Support --error-checking=byte-code. -1999-05-14 XEmacs Build Bot +1999-05-14 XEmacs Build Bot * XEmacs 21.2.14 is released @@ -3136,7 +3274,7 @@ * configure.in: Check for getloadavg(). -1999-03-12 XEmacs Build Bot +1999-03-12 XEmacs Build Bot * XEmacs 21.2.13 is released @@ -3144,7 +3282,7 @@ * Makefile.in.in (LC_ALL): Try very, very hard to build in C locale. -1999-03-05 XEmacs Build Bot +1999-03-05 XEmacs Build Bot * XEmacs 21.2.12 is released @@ -3164,7 +3302,7 @@ * PROBLEMS: Document crashes on SPARC with gcc 2.8.1. -1999-03-01 XEmacs Build Bot +1999-03-01 XEmacs Build Bot * XEmacs 21.2.11 is released @@ -3217,11 +3355,11 @@ * configure.in: Warn if using Motif dialog boxes on AIX 4.3. -1999-02-05 XEmacs Build Bot +1999-02-05 XEmacs Build Bot * XEmacs 21.2.10 is released -1999-02-02 XEmacs Build Bot +1999-02-02 XEmacs Build Bot * XEmacs 21.2.9 is released @@ -3230,7 +3368,7 @@ * configure.in: make xface detection specifc to a window system in general rather than just X. -1999-18-10 Andy Piper +1999-18-10 Andy Piper * configure.in: remove -O3 prevention on cygwin - current versions cope ok now. remove dll prevention on cygwin - the new module @@ -3258,7 +3396,7 @@ * Makefile.in.in: Added moduledir, sitemoduledir macros. - Make those directories at install time. -1998-12-28 Martin Buchholz +1998-12-28 Martin Buchholz * XEmacs 21.2.8 is released. @@ -3266,7 +3404,7 @@ * PROBLEMS: Document Linux GNU Libc 2.0 I18N crashes. -1998-12-24 Martin Buchholz +1998-12-24 Martin Buchholz * XEmacs 21.2.7 is released. @@ -3305,7 +3443,7 @@ * XEmacs 21.2.6 is released -1998-12-05 XEmacs Build Bot +1998-12-05 XEmacs Build Bot * XEmacs 21.2.5 is released @@ -3448,7 +3586,7 @@ * configure.in: Fix test for InfoDock sources. -1998-07-09 Oliver Graf +1998-07-09 Oliver Graf * configure.usage: added warning to --with-offix @@ -3461,7 +3599,7 @@ * XEmacs 21.0-pre3 is released. -1998-06-20 Kazuyuki IENAGA +1998-06-20 Kazuyuki IENAGA * configure.in: Added check if the berkdb has db_open or not. (With fixes from Martin Buchholz) @@ -3482,13 +3620,13 @@ * XEmacs 21.0-beta43 is released. -1998-06-04 Oliver Graf +1998-06-04 Oliver Graf * tests/Dnd/README: a step-by-step test run * tests/Dnd/droptest.el: some clarifications * tests/Dnd/droptest.sh: created, creates test files -1998-06-01 Oliver Graf +1998-06-01 Oliver Graf * configure.in (summary): added experimental to dragndrop option * configure.usage: added experimental note to --with-dragndrop @@ -3555,7 +3693,7 @@ * configure.in (ZSH_VERSION): zsh-3.1.2 (and zsh-3.0.4) drops core on the `unset CDPATH' if running as sh. -1998-05-12 Oliver Graf +1998-05-12 Oliver Graf * tests/Dnd/droptest.el: some CDE adaptions (untested) @@ -3586,18 +3724,18 @@ hand-crafted regexps. - Use standard coding conventions for modules/Makefile.in -1998-05-12 Kazuyuki IENAGA +1998-05-12 Kazuyuki IENAGA * configure.in: some people claimed that they can't stop linking wnn6 library if they set --with-wnn6=no. -1998-05-11 Oliver Graf +1998-05-11 Oliver Graf * tests/Dnd/droptest.el: adapted to new calling conventions also showing the new possibilities * tests/Dnd/README: changed to new protocol -1998-05-11 SAKIYAMA Nobuo +1998-05-11 SAKIYAMA Nobuo * Fix for HAVE_MULTICAST check. @@ -3605,7 +3743,7 @@ * XEmacs 21.0-beta39 is released. -1998-05-06 Oliver Graf +1998-05-06 Oliver Graf * configure.in: added autodetection for the Drag'n'Drop API if some DnD protocol is found, HAVE_DRAGNDROP will be defined @@ -3613,7 +3751,7 @@ * configure.usage: added with-dragndrop, added (*) to with-offix * tests/Dnd/droptest.el: complete overhaul, no it's a real test -1998-05-04 Oliver Graf +1998-05-04 Oliver Graf * tests/Dnd/droptest.el: changed to test new protocol * tests/Dnd/README.OffiX: removed @@ -3720,7 +3858,7 @@ * Makefile.in: add install_pp to install incantation. -1998-04-14 Itay Ben-Yaacov +1998-04-14 Itay Ben-Yaacov * configure.in: Large echo split into a few smaller ones, so the cygnus sh.exe does not crash. @@ -3859,7 +3997,7 @@ * 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. @@ -4221,7 +4359,7 @@ * XEmacs 20.5-beta14 is released. -1997-12-23 Andy Piper +1997-12-23 Andy Piper * configure.in: support for *-pc-cygwin32 config @@ -4283,18 +4421,18 @@ * configure.in (imagick_libs): Add autodetection for freetype -lttf library. -1997-12-09 SL Baur +1997-12-09 SL Baur * XEmacs 20.5-beta9 is released. -1997-12-06 SL Baur +1997-12-06 SL Baur * XEmacs 20.5-beta8 is released. * info/dir: update for further packaging. * configure.in: remove `tree-x' from XEmacs build. -1997-11-29 Jeff Miller +1997-11-29 Jeff Miller * configure.in: motif menubars need xlwmenu.o @@ -4333,12 +4471,12 @@ * lwlib/xlwmenu.c (display_menu): Defer incremental menus properly. From Glynn Clements -1997-11-25 Kazuyuki IENAGA +1997-11-25 Kazuyuki IENAGA * configure.in: Improve auto detect of libraries ImageMagick rely on. -1997-11-23 Jeff Miller +1997-11-23 Jeff Miller * Energize is dead. Removed ENERGIZE ifdef's from code in lwlib and src. Configure.in modified. --with-energize is no longer a @@ -4363,7 +4501,7 @@ * configure.usage: Use `--' convention in "usage:" line. -1997-11-20 Stephen Turnbull +1997-11-20 Stephen Turnbull * configure.in: added `with_xfs' to list of boolean features. @@ -4371,7 +4509,7 @@ * XEmacs 20.3 is released for binary kit building. -1997-11-19 Tor Arntsen +1997-11-19 Tor Arntsen * PROBLEMS: Removed IRIX entry about xemacs core dumps when using xemacs dumped on one machine on another. Problem was fixed by 20.3. @@ -4402,12 +4540,12 @@ * XEmacs 20.3-pre3 is released. * XEmacs 20.5-beta5 is released. -1997-11-13 Marc Paquette +1997-11-13 Marc Paquette * nt/Todo: added a task for support of lisp packages through the registry. -1997-11-13 Jonathan Harris +1997-11-13 Jonathan Harris * Renamed files *w32* to *msw* @@ -4458,7 +4596,7 @@ script. You give a colon or space separated list of prefixes, and subdirectories include/ and lib/ will be added with -I and -L. -1997-11-05 Martin Buchholz +1997-11-05 Martin Buchholz * configure.in: AIX + gcc fixes. - Don't wrap -B. aixflags changed to start_flags. @@ -4737,7 +4875,7 @@ * XEmacs 20.3-beta23 is released. -1997-09-19 SL Baur +1997-09-19 SL Baur * XEmacs 19.16-pre3 is released. @@ -5204,7 +5342,7 @@ * XEmacs 20.3-beta8 is released. -1997-06-20 Olivier Galibert +1997-06-20 Olivier Galibert * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xlw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c: Make 64 bit clean. diff -r 71bf2c5667ba -r 66411359ce4e Makefile.in.in --- a/Makefile.in.in Sat Oct 25 20:35:36 2008 +0900 +++ b/Makefile.in.in Sat Oct 25 21:40:46 2008 +0900 @@ -1,4 +1,4 @@ -## Copyright (C) 2003, 2005 Ben Wing. +## Copyright (C) 2003, 2005 Ben Wing. ## DIST: This is the distribution Makefile for XEmacs. configure can ## DIST: make most of the changes to this file you might want, so try @@ -92,6 +92,7 @@ ## This will be the name of the generated binary and is set automatically ## by configure. PROGNAME=@PROGNAME@ +SHEBANG_PROGNAME=@SHEBANG_PROGNAME@ ## ==================== Where To Install Things ==================== @@ -116,6 +117,10 @@ ## run directly (like etags). bindir=@bindir@ +## Base for installing architecture-independent data files. +## ${infodir} and ${mandir} are subdirectories of this. +datarootdir=@datarootdir@ + ## Where to install architecture-independent data files. ## ${lispdir} and ${etcdir} are subdirectories of this. datadir=@datadir@ @@ -252,7 +257,7 @@ .PHONY: ${SUBDIR} all beta ## Convenience target for XEmacs beta testers -beta: elcclean all +beta: elcclean update-version all ## Convenience target for XEmacs maintainers ## This would run `make-xemacsdist' if I were really confident that everything @@ -312,6 +317,13 @@ ${SUBDIR}: ${SUBDIR_MAKEFILES} ${GENERATED_HEADERS} FRC cd ./$@ && $(MAKE) $(RECURSIVE_MAKE_ARGS) all +## This should be the same code as in configure.ac. +update-version: + cp ${srcdir}/version.sh.in ${srcdir}/version.sh + if test -d ${srcdir}/.hg; then \ + (cd ${srcdir}; hg identify | cut -d " " -f 1 >> version.sh); \ + fi + ## Building modules depends on ellcc, found in lib-src. modules/sample modules/ldap modules/zlib modules/base64: lib-src modules/postgresql modules/canna: lib-src @@ -403,10 +415,12 @@ ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe -chmod 0755 ${bindir}/${PROGNAME}-${version}.exe cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} + cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME} # else ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} -chmod 0755 ${bindir}/${PROGNAME}-${version} cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} + cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${SHEBANG_PROGNAME} # endif /* CYGWIN */ #endif /* WIN32_NATIVE */ if test "${prefix}" != "${exec_prefix}"; then \ @@ -487,6 +501,58 @@ #endif ${sitelispdir} +## Install bundled packages, if present. + +package_path = @LATE_PACKAGE_DIRECTORIES@ +pkgsrcdir = ${srcdir}/etc/bundled-packages + +## #### Probably we should add a rule for lib-src/make-path here. + +check-available-packages: + @if test -r ${pkgsrcdir}/bootstrap.tar.gz; \ + then echo "To install a set of bootstrap packages in"; \ + echo "${package_path}/xemacs-packages, type:"; \ + echo " make install-bootstrap-packages"; \ + fi; \ + if test -r ${pkgsrcdir}/xemacs-sumo.tar.gz; \ + then echo "To install the full set of non-mule packages in"; \ + echo "${package_path}/xemacs-packages, type:"; \ + echo " make install-nonmule-packages"; \ + fi; \ + if test -r ${pkgsrcdir}/xemacs-mule-sumo.tar.gz; \ + then echo "To install the full set of packages with mule in"; \ + echo "${package_path}/mule-packages, type:"; \ + echo " make install-all-packages"; \ + fi + +## The test for a non-trivial path simply checks for the conventional Unix +## path separator ":". This is reasonable because this is basically just +## a convenience feature, anyway. + +mkpkgdir: FRC.mkdir ${MAKEPATH} + @if test -z ${package_path}; \ + then echo "Not configured --with-late-packages; no place to install."; \ + exit -1; \ + elif echo ${package_path} | grep ":"; \ + then echo "Configured with multiple late package directories; you decide where to install."; \ + exit -1; \ + elif test -e ${package_path}/xemacs-packages \ + -o -e ${package_path}/mule-packages; \ + then echo "${package_path} is installed; won't overwrite packages."; \ + exit -1; \ + fi + ${MAKEPATH} ${package_path}; + +install-bootstrap-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/bootstrap.tar.gz + +install-nonmule-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz + +install-all-packages: mkpkgdir + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-sumo.tar.gz; \ + cd ${package_path}; tar xvzf ${pkgsrcdir}/xemacs-mule-sumo.tar.gz + ## Delete all the installed files that the `install' target would ## create (but not the noninstalled files such as `make all' would ## create). diff -r 71bf2c5667ba -r 66411359ce4e config.guess --- a/config.guess Sat Oct 25 20:35:36 2008 +0900 +++ b/config.guess Sat Oct 25 21:40:46 2008 +0900 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-02-10' +timestamp='2007-12-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +18,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -66,11 +69,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +126,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -158,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -196,55 +200,23 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +269,43 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +313,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +347,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +362,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +376,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +433,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +475,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +505,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,14 +520,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -565,28 +545,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +628,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -658,11 +648,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,161 +680,189 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - amd64:CYGWIN*:*:*) + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin - exit 0 ;; + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -861,8 +879,12 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -880,15 +902,22 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -902,7 +931,7 @@ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -910,25 +939,31 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -946,15 +981,15 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -971,7 +1006,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -981,16 +1016,23 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -998,27 +1040,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1026,15 +1068,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1126,69 +1169,81 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1196,25 +1251,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1225,41 +1280,47 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1291,7 +1352,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1380,11 +1441,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1393,22 +1455,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1419,7 +1481,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff -r 71bf2c5667ba -r 66411359ce4e config.sub --- a/config.sub Sat Oct 25 20:35:36 2008 +0900 +++ b/config.sub Sat Oct 25 21:40:46 2008 +0900 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-02-10' +timestamp='2007-12-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +22,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -83,11 +85,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +101,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,8 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -170,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -186,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -230,14 +241,16 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -246,6 +259,7 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,20 +268,24 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -278,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -297,18 +318,18 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -319,6 +340,7 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,27 +349,34 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -418,6 +447,14 @@ basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; c90) basic_machine=c90-cray os=-unicos @@ -450,8 +487,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -643,6 +680,14 @@ basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -658,6 +703,10 @@ basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -683,6 +732,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -758,9 +810,8 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -782,6 +833,14 @@ basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -791,6 +850,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -847,6 +912,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -873,6 +942,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -884,6 +957,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -1086,13 +1162,10 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1165,20 +1238,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1196,7 +1272,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1330,6 +1406,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1339,9 +1421,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1367,6 +1449,9 @@ m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1385,6 +1470,9 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1556,7 +1644,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -r 71bf2c5667ba -r 66411359ce4e configure --- a/configure Sat Oct 25 20:35:36 2008 +0900 +++ b/configure Sat Oct 25 21:40:46 2008 +0900 @@ -706,6 +706,7 @@ build_cpu build_vendor build_os +SHEBANG_PROGNAME configuration CC CFLAGS @@ -778,6 +779,7 @@ INFODIR infopath INFOPATH_USER_DEFINED +INFOPATH early_packages EARLY_PACKAGE_DIRECTORIES_USER_DEFINED EARLY_PACKAGE_DIRECTORIES @@ -1521,7 +1523,7 @@ Specify location of last/legacy packages (instead of default location; same as --with-legacy-packages). --with-legacy-packages=DIR - Specify location of late/legacy packages (instead of + Specify location of last/legacy packages (instead of default location; same as --with-last-packages). --with-package-path=PATH Search path for package directories. @@ -1536,7 +1538,8 @@ `gauges'. Prefix component with `no' to disable its use of Xft. Requires X11, Xft, Xrender, freetype, and fontconfig support. Default is `noemacs, - nomenubars, notabs, nogauges'. + nomenubars, notabs, nogauges'. The default when + selected is `emacs, nomenubars, notabs, nogauges'. --with-gtk Support GTK on the X Window System. (EXPERIMENTAL) --with-gnome Support GNOME on the X Window System. (EXPERIMENTAL) --with-msw Support MS Windows as a window system (only under @@ -1661,7 +1664,7 @@ --with-database=TYPE Compile with database support. Valid types are `no' or a comma-separated list of one or more of `berkdb' - and either `dbm' or `gnudbm'. + and either `dbm' or `gdbm'. --with-ldap Support the LDAP protocol. --with-postgresql Support the PostgreSQL RDBMS. @@ -2842,7 +2845,7 @@ enableval="$with_legacy_packages" withval="$with_legacy_packages" cat >>confdefs.h <<\_ACEOF -#define LATE_PACKAGE_DIRECTORIES_USER_DEFINED 1 +#define LAST_PACKAGE_DIRECTORIES_USER_DEFINED 1 _ACEOF fi; @@ -2886,12 +2889,12 @@ fi; _xft_notfirst="" -_xft_emacs_default=no +_xft_emacs_default=yes _xft_menubars_default=no _xft_tabs_default=no _xft_gauges_default=no _xft_types="emacs menubars tabs gauges" -_xft_default="noemacs,nomenubars,notabs,nogauges" +_xft_default="emacs,nomenubars,notabs,nogauges" # If --with-xft or --without-xft were given then copy the value to the # equivalent enable_xft variable. @@ -2968,7 +2971,7 @@ eval "enable_xft_$y=\$_xft_${y}_default" unset _xft_${y}_default done - +with_xft_emacs=no fi; # If --with-gtk or --without-gtk were given then copy the value to the # equivalent enable_gtk variable. @@ -3772,7 +3775,7 @@ if test "$enable_database_dbm" = "yes" -a "$enable_database_gdbm" = "yes"; then (echo "$progname: Usage error:" -echo " " "Only one of \`dbm' and \`gnudbm' may be specified +echo " " "Only one of \`dbm' and \`gdbm' may be specified with the \`--with-database' option." echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi @@ -4547,37 +4550,6 @@ *) break ;; esac done - -if test "x$datadir_expanded" != "x$prefix_expanded/share" -then - cat >>confdefs.h <<\_ACEOF -#define INFODIR_USER_DEFINED 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define LISPDIR_USER_DEFINED 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define MODULEDIR_USER_DEFINED 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define ETCDIR_USER_DEFINED 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define DOCDIR_USER_DEFINED 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define ARCHLIBDIR_USER_DEFINED 1 -_ACEOF - -else - datadir='${prefix}/lib' -fi - exec_prefix_expanded=$exec_prefix while true; do case "$exec_prefix_expanded" in @@ -4592,15 +4564,6 @@ *) break ;; esac done - -if test "x$libdir_expanded" != "x$exec_prefix_expanded/lib" -then - cat >>confdefs.h <<\_ACEOF -#define ARCHLIBDIR_USER_DEFINED 1 -_ACEOF - -fi - mandir_expanded=$mandir while true; do case "$mandir_expanded" in @@ -4608,12 +4571,6 @@ *) break ;; esac done - -if test "x$mandir_expanded" = "x$prefix_expanded/man" -then - mandir='${prefix}/man/man1' -fi - infodir_expanded=$infodir while true; do case "$infodir_expanded" in @@ -4622,14 +4579,46 @@ esac done -if test "x$infodir_expanded" != "x${prefix_expanded}/info" +if test "x$datadir_expanded" != "x$prefix_expanded/share" then cat >>confdefs.h <<\_ACEOF #define INFODIR_USER_DEFINED 1 _ACEOF -else - infodir='${datadir}/${instvardir}/info' + cat >>confdefs.h <<\_ACEOF +#define LISPDIR_USER_DEFINED 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define ETCDIR_USER_DEFINED 1 +_ACEOF + +fi + +if test "x$libdir_expanded" != "x$prefix_expanded/lib" +then + cat >>confdefs.h <<\_ACEOF +#define MODULEDIR_USER_DEFINED 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define ARCHLIBDIR_USER_DEFINED 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define DOCDIR_USER_DEFINED 1 +_ACEOF + +fi + +if test "x$infodir_expanded" != "x${prefix_expanded}/share/info" +then + cat >>confdefs.h <<\_ACEOF +#define INFODIR_USER_DEFINED 1 +_ACEOF + +else + infodir='${datarootdir}/${instvardir}/info' fi with_sitelispdir='${datadir}/${inststaticdir}/site-lisp' @@ -4777,6 +4766,10 @@ +cp "$srcdir/version.sh.in" "$srcdir/version.sh" +if test -d "$srcdir/.hg"; then + (cd "$srcdir"; hg identify | cut -d " " -f 1 >> version.sh) +fi . "$srcdir/version.sh" || exit 1; if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi : "${verbose=$beta}" @@ -4849,16 +4842,25 @@ version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} PROGNAME=infodock + SHEBANG_PROGNAME=infodock-script CPPFLAGS="$CPPFLAGS -DINFODOCK" else PROGNAME=xemacs -fi + SHEBANG_PROGNAME=xemacs-script +fi + + cat >>confdefs.h <<_ACEOF #define EMACS_PROGNAME "$PROGNAME" _ACEOF +cat >>confdefs.h <<_ACEOF +#define SHEBANG_PROGNAME "${PROGNAME}-script" +_ACEOF + + if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi test "${enable_error_checking_extents:=$beta}" = yes && cat >>confdefs.h <<\_ACEOF #define ERROR_CHECK_EXTENTS 1 @@ -5349,7 +5351,7 @@ if test "$enable_vdb" = "auto"; then case "$opsys" in darwin ) case "$machine" in - i686 ) check_vdb_posix=yes ;; + i[3-9]86 ) check_vdb_posix=yes ;; * ) cat >>confdefs.h <<\_ACEOF #define VDB_MACH 1 _ACEOF @@ -19601,6 +19603,15 @@ { echo "$as_me:$LINENO: checking for Xrender, fontconfig, and Xft" >&5 echo $ECHO_N "checking for Xrender, fontconfig, and Xft... $ECHO_C" >&6; } xft_includes_found=no + xft_config_prog="pkg-config xft" + xft_config_ok=`$xft_config_prog --cflags 2>/dev/null` + if test "$?" = 0 ; then + xft_cflags=`$xft_config_prog --cflags` + xft_libs=`$xft_config_prog --libs` + c_switch_site="$c_switch_site $xft_cflags" + ld_switch_site="$ld_switch_site $xft_libs" + xft_includes_found=yes + else for ac_header in freetype/config/ftheader.h do @@ -19744,15 +19755,16 @@ xft_includes_found=yes else - for freetype_include_top in "/usr/X11R6/include/freetype2" \ - "/usr/include/freetype2" - do - if test -d $freetype_include_top; then - { echo "$as_me:$LINENO: checking in ${freetype_include_top}/freetype2" >&5 -echo $ECHO_N "checking in ${freetype_include_top}/freetype2... $ECHO_C" >&6; } - unset "$as_ac_Header" - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I${freetype_include_top}" + for freetype_include_top in "/usr/local/include/freetype2" \ + "/usr/X11R6/include/freetype2" \ + "/usr/include/freetype2" + do + if test -d $freetype_include_top; then + { echo "$as_me:$LINENO: checking in ${freetype_include_top}" >&5 +echo $ECHO_N "checking in ${freetype_include_top}... $ECHO_C" >&6; } + unset "$as_ac_Header" + save_c_switch_site="$c_switch_site" + c_switch_site="$c_switch_site -I${freetype_include_top}" for ac_header in freetype/config/ftheader.h do @@ -19900,12 +19912,13 @@ done - fi - done -fi - -done - + fi + done +fi + +done + + fi if test "$xft_includes_found" != "yes"; then { echo "Error:" "Unable to find headers for --with-xft" >&2; exit 1; } else @@ -20110,6 +20123,195 @@ { echo "Error:" "Unable to find libXft for --with-xft" >&2; exit 1; } fi + + +for ac_func in FcConfigGetRescanInterval +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +for ac_func in FcConfigSetRescanInterval +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + with_fontconfig=yes cat >>confdefs.h <<\_ACEOF #define HAVE_FONTCONFIG 1 @@ -25495,9 +25697,9 @@ echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then - as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_threeDClassRec" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for threeDClassRec in -l$athena_variant" >&5 -echo $ECHO_N "checking for threeDClassRec in -l$athena_variant... $ECHO_C" >&6; } + as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_XawSme3dComputeTopShadowRGB" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -l$athena_variant" >&5 +echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -l$athena_variant... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -25516,11 +25718,11 @@ #ifdef __cplusplus extern "C" #endif -char threeDClassRec (); -int -main () -{ -return threeDClassRec (); +char XawSme3dComputeTopShadowRGB (); +int +main () +{ +return XawSme3dComputeTopShadowRGB (); ; return 0; } @@ -25572,9 +25774,9 @@ fi else - as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_threeDClassRec" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for threeDClassRec in -l$athena_variant" >&5 -echo $ECHO_N "checking for threeDClassRec in -l$athena_variant... $ECHO_C" >&6; } + as_ac_Lib=`echo "ac_cv_lib_$athena_variant''_XawSme3dComputeTopShadowRGB" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -l$athena_variant" >&5 +echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -l$athena_variant... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -25593,11 +25795,11 @@ #ifdef __cplusplus extern "C" #endif -char threeDClassRec (); -int -main () -{ -return threeDClassRec (); +char XawSme3dComputeTopShadowRGB (); +int +main () +{ +return XawSme3dComputeTopShadowRGB (); ; return 0; } @@ -25638,9 +25840,9 @@ if test `eval echo '${'$as_ac_Lib'}'` = yes; then athena_lib=$athena_variant else - { echo "$as_me:$LINENO: checking for threeDClassRec in -lXaw" >&5 -echo $ECHO_N "checking for threeDClassRec in -lXaw... $ECHO_C" >&6; } -if test "${ac_cv_lib_Xaw_threeDClassRec+set}" = set; then + { echo "$as_me:$LINENO: checking for XawSme3dComputeTopShadowRGB in -lXaw" >&5 +echo $ECHO_N "checking for XawSme3dComputeTopShadowRGB in -lXaw... $ECHO_C" >&6; } +if test "${ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -25658,48 +25860,48 @@ #ifdef __cplusplus extern "C" #endif -char threeDClassRec (); -int -main () -{ -return threeDClassRec (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_Xaw_threeDClassRec=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_Xaw_threeDClassRec=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_threeDClassRec" >&5 -echo "${ECHO_T}$ac_cv_lib_Xaw_threeDClassRec" >&6; } -if test $ac_cv_lib_Xaw_threeDClassRec = yes; then +char XawSme3dComputeTopShadowRGB (); +int +main () +{ +return XawSme3dComputeTopShadowRGB (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB" >&5 +echo "${ECHO_T}$ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB" >&6; } +if test $ac_cv_lib_Xaw_XawSme3dComputeTopShadowRGB = yes; then athena_lib=Xaw; { echo "$as_me:$LINENO: WARNING: Assuming that libXaw is actually $athena_variant." >&5 @@ -27131,11 +27333,11 @@ with_xft_tabs="no" fi fi -if test "$with_xft_gauge" != "no" ; then +if test "$with_xft_gauges" != "no" ; then if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then - with_xft_gauge="yes" - else - with_xft_gauge="no" + with_xft_gauges="yes" + else + with_xft_gauges="no" fi fi @@ -27327,8 +27529,8 @@ #define USE_XFT_TABS 1 _ACEOF -test "$with_xft_gauge" = "yes" && cat >>confdefs.h <<\_ACEOF -#define USE_XFT_GAUGE 1 +test "$with_xft_gauges" = "yes" && cat >>confdefs.h <<\_ACEOF +#define USE_XFT_GAUGES 1 _ACEOF @@ -37044,12 +37246,81 @@ enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm else + { echo "$as_me:$LINENO: checking for dbm_open in -lgdbm_compat" >&5 +echo $ECHO_N "checking for dbm_open in -lgdbm_compat... $ECHO_C" >&6; } +if test "${ac_cv_lib_gdbm_compat_dbm_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgdbm_compat -lgdbm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (); +int +main () +{ +return dbm_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_gdbm_compat_dbm_open=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_gdbm_compat_dbm_open=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_gdbm_compat_dbm_open" >&5 +echo "${ECHO_T}$ac_cv_lib_gdbm_compat_dbm_open" >&6; } +if test $ac_cv_lib_gdbm_compat_dbm_open = yes; then + + enable_database_gdbm=yes enable_database_dbm=no libdbm="-lgdbm_compat -lgdbm" +else + if test "$enable_database_gdbm" = "yes"; then { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; } fi enable_database_gdbm=no fi + +fi + fi if test "$enable_database_dbm" != "no"; then @@ -37700,7 +37971,7 @@ fi - if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then + if test "$enable_database_berkdb" = "yes" -a "$dbver" = "4"; then rm -f $tempcname echo "#include <$db_h_file>" > $tempcname echo "configure___ dbfunc=db_create" >> $tempcname @@ -38806,6 +39077,7 @@ + PREFIX=$prefix while true; do case "$PREFIX" in @@ -38848,6 +39120,7 @@ esac done + test -n "$with_user_packages" && with_early_packages=$with_user_packages early_packages=$with_early_packages @@ -39310,7 +39583,7 @@ echo " - Using Xft to render antialiased fonts in tab controls." echo " WARNING: This feature will be replaced with a face." fi -if test "$with_xft_gauge" = "yes"; then +if test "$with_xft_gauges" = "yes"; then echo " - Using Xft to render antialiased fonts in progress bars." echo " WARNING: This feature will be replaced with a face." echo " WARNING: This feature not yet implemented; setting ignored." @@ -40176,6 +40449,7 @@ build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim +SHEBANG_PROGNAME!$SHEBANG_PROGNAME$ac_delim configuration!$configuration$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim @@ -40227,7 +40501,6 @@ ldap_libs!$ldap_libs$ac_delim postgresql_libs!$postgresql_libs$ac_delim lwlib_objs!$lwlib_objs$ac_delim -canna_libs!$canna_libs$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -40269,6 +40542,7 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +canna_libs!$canna_libs$ac_delim ALLOCA!$ALLOCA$ac_delim have_esd_config!$have_esd_config$ac_delim SRC_SUBDIR_DEPS!$SRC_SUBDIR_DEPS$ac_delim @@ -40289,6 +40563,7 @@ INFODIR!$INFODIR$ac_delim infopath!$infopath$ac_delim INFOPATH_USER_DEFINED!$INFOPATH_USER_DEFINED$ac_delim +INFOPATH!$INFOPATH$ac_delim early_packages!$early_packages$ac_delim EARLY_PACKAGE_DIRECTORIES_USER_DEFINED!$EARLY_PACKAGE_DIRECTORIES_USER_DEFINED$ac_delim EARLY_PACKAGE_DIRECTORIES!$EARLY_PACKAGE_DIRECTORIES$ac_delim @@ -40345,7 +40620,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 74; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 76; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff -r 71bf2c5667ba -r 66411359ce4e configure.ac --- a/configure.ac Sat Oct 25 20:35:36 2008 +0900 +++ b/configure.ac Sat Oct 25 21:40:46 2008 +0900 @@ -387,9 +387,11 @@ dnl dnl Internal macro to recursively expand all the options in the option list. dnl +dnl m4_fst disappeared without a trace in autoconf 2.62 +m4_define([xe_fst], [$1])dnl define([XE_EXPAND_COMPLEX_OPTIONS], [m4_if([$2], [], [], - [XE_EXPAND_COMPLEX_OPTION([$1], m4_fst($2))[]dnl + [XE_EXPAND_COMPLEX_OPTION([$1], xe_fst($2))[]dnl XE_EXPAND_COMPLEX_OPTIONS([$1], XE_CDR($2))])])dnl dnl dnl XE_INIT_COMPLEX_OPTION(prefix, option_list) @@ -666,8 +668,8 @@ AS_HELP_STRING([--with-last-packages=DIR],[Specify location of last/legacy packages (instead of default location; same as --with-legacy-packages).]), [AC_DEFINE(LAST_PACKAGE_DIRECTORIES_USER_DEFINED)], []) XE_MERGED_ARG([legacy-packages], - AS_HELP_STRING([--with-legacy-packages=DIR],[Specify location of late/legacy packages (instead of default location; same as --with-last-packages).]), - [AC_DEFINE(LATE_PACKAGE_DIRECTORIES_USER_DEFINED)], []) + AS_HELP_STRING([--with-legacy-packages=DIR],[Specify location of last/legacy packages (instead of default location; same as --with-last-packages).]), + [AC_DEFINE(LAST_PACKAGE_DIRECTORIES_USER_DEFINED)], []) XE_MERGED_ARG([package-path], AS_HELP_STRING([--with-package-path=PATH],[Search path for package directories.]), [AC_DEFINE(PACKAGE_PATH_USER_DEFINED)], []) @@ -688,9 +690,10 @@ [Xft], [`emacs' (buffers), `menubars', `tabs', and `gauges'], [X11, Xft, Xrender, freetype, and fontconfig], - [`noemacs, nomenubars, notabs, nogauges'])], - [],[], - [XE_COMPLEX_OPTION([emacs],[no]), + [`noemacs, nomenubars, notabs, nogauges'. + The default when selected is `emacs, nomenubars, notabs, nogauges'])], + [],[with_xft_emacs=no], + [XE_COMPLEX_OPTION([emacs],[yes]), XE_COMPLEX_OPTION([menubars],[no]), XE_COMPLEX_OPTION([tabs],[no]), XE_COMPLEX_OPTION([gauges],[no])]) @@ -866,10 +869,10 @@ XE_COMPLEX_ARG([database], AS_HELP_STRING([--enable-database=TYPE],[Compile with database support. Valid types are `no' or a comma-separated list of one or more - of `berkdb' and either `dbm' or `gnudbm'.]), + of `berkdb' and either `dbm' or `gdbm'.]), [ if test "$enable_database_dbm" = "yes" -a "$enable_database_gdbm" = "yes"; then - USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified + USAGE_ERROR("Only one of \`dbm' and \`gdbm' may be specified with the \`--with-database' option.") fi ], @@ -1068,41 +1071,30 @@ XE_EXPAND_VARIABLE(prefix,prefix_expanded) XE_EXPAND_VARIABLE(datadir,datadir_expanded) +XE_EXPAND_VARIABLE(exec_prefix,exec_prefix_expanded) +XE_EXPAND_VARIABLE(libdir,libdir_expanded) +XE_EXPAND_VARIABLE(mandir,mandir_expanded) +XE_EXPAND_VARIABLE(infodir,infodir_expanded) if test "x$datadir_expanded" != "x$prefix_expanded/share" then AC_DEFINE(INFODIR_USER_DEFINED) AC_DEFINE(LISPDIR_USER_DEFINED) - AC_DEFINE(MODULEDIR_USER_DEFINED) AC_DEFINE(ETCDIR_USER_DEFINED) - AC_DEFINE(DOCDIR_USER_DEFINED) - AC_DEFINE(ARCHLIBDIR_USER_DEFINED) -else - datadir='${prefix}/lib' -fi - -XE_EXPAND_VARIABLE(exec_prefix,exec_prefix_expanded) -XE_EXPAND_VARIABLE(libdir,libdir_expanded) - -if test "x$libdir_expanded" != "x$exec_prefix_expanded/lib" +fi + +if test "x$libdir_expanded" != "x$prefix_expanded/lib" then + AC_DEFINE(MODULEDIR_USER_DEFINED) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) -fi - -XE_EXPAND_VARIABLE(mandir,mandir_expanded) - -if test "x$mandir_expanded" = "x$prefix_expanded/man" -then - mandir='${prefix}/man/man1' -fi - -XE_EXPAND_VARIABLE(infodir,infodir_expanded) - -if test "x$infodir_expanded" != "x${prefix_expanded}/info" + AC_DEFINE(DOCDIR_USER_DEFINED) +fi + +if test "x$infodir_expanded" != "x${prefix_expanded}/share/info" then AC_DEFINE(INFODIR_USER_DEFINED) else - infodir='${datadir}/${instvardir}/info' + infodir='${datarootdir}/${instvardir}/info' fi with_sitelispdir='${datadir}/${inststaticdir}/site-lisp' @@ -1174,6 +1166,11 @@ dnl ---------------------------------------- dnl Find out which version of XEmacs this is dnl ---------------------------------------- +dnl This should be the same code as in Makefile.in.in +cp "$srcdir/version.sh.in" "$srcdir/version.sh" +if test -d "$srcdir/.hg"; then + (cd "$srcdir"; hg identify | cut -d " " -f 1 >> version.sh) +fi . "$srcdir/version.sh" || exit 1; dnl Must do the following first to determine verbosity for AC_DEFINE if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi @@ -1217,13 +1214,19 @@ AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version) version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version} PROGNAME=infodock + SHEBANG_PROGNAME=infodock-script CPPFLAGS="$CPPFLAGS -DINFODOCK" else PROGNAME=xemacs -fi + SHEBANG_PROGNAME=xemacs-script +fi + +AC_SUBST(SHEBANG_PROGNAME) AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME") +AC_DEFINE_UNQUOTED(SHEBANG_PROGNAME, "${PROGNAME}-script") + dnl ---------------------------------- dnl Error checking and debugging flags dnl ---------------------------------- @@ -1804,7 +1807,7 @@ if test "$enable_vdb" = "auto"; then case "$opsys" in darwin ) case "$machine" in - i686 ) check_vdb_posix=yes ;; + i[[3-9]]86 ) check_vdb_posix=yes ;; * ) AC_DEFINE(VDB_MACH) have_vdb_mach=yes ;; esac ;; cygwin* ) AC_DEFINE(VDB_WIN32) have_vdb_win32=yes ;; @@ -3495,27 +3498,39 @@ if test "$with_xft_emacs" = "yes"; then AC_MSG_CHECKING([for Xrender, fontconfig, and Xft]) xft_includes_found=no - AC_CHECK_HEADERS([freetype/config/ftheader.h], - [xft_includes_found=yes], - [ - dnl #### How about /sw/include, and /opt/local/include? - dnl these directories need to be the parent of the freetype directory - for freetype_include_top in "/usr/X11R6/include/freetype2" \ - "/usr/include/freetype2" - do - if test -d $freetype_include_top; then - AC_MSG_CHECKING([in ${freetype_include_top}/freetype2]) - dnl disable autoconf's fucking cache; why these fuckheads think it - dnl is better to be broken than to be slow, I don't know! - dnl #### there's gotta be a better-looking way to do this!! - unset "$as_ac_Header" - save_c_switch_site="$c_switch_site" - c_switch_site="$c_switch_site -I${freetype_include_top}" - AC_CHECK_HEADERS([freetype/config/ftheader.h], - [xft_includes_found=yes], - [c_switch_site=$save_c_switch_site]) - fi - done]) + dnl try pkg-config + xft_config_prog="pkg-config xft" + xft_config_ok=`$xft_config_prog --cflags 2>/dev/null` + if test "$?" = 0 ; then + xft_cflags=`$xft_config_prog --cflags` + xft_libs=`$xft_config_prog --libs` + c_switch_site="$c_switch_site $xft_cflags" + ld_switch_site="$ld_switch_site $xft_libs" + xft_includes_found=yes + else + AC_CHECK_HEADERS([freetype/config/ftheader.h], + [xft_includes_found=yes], + [ + dnl #### How about /sw/include, and /opt/local/include? + dnl these directories need to be the parent of the freetype directory + for freetype_include_top in "/usr/local/include/freetype2" \ + "/usr/X11R6/include/freetype2" \ + "/usr/include/freetype2" + do + if test -d $freetype_include_top; then + AC_MSG_CHECKING([in ${freetype_include_top}]) + dnl disable autoconf's fucking cache; why these fuckheads think it + dnl is better to be broken than to be slow, I don't know! + dnl #### there's gotta be a better-looking way to do this!! + unset "$as_ac_Header" + save_c_switch_site="$c_switch_site" + c_switch_site="$c_switch_site -I${freetype_include_top}" + AC_CHECK_HEADERS([freetype/config/ftheader.h], + [xft_includes_found=yes], + [c_switch_site=$save_c_switch_site]) + fi + done]) + fi if test "$xft_includes_found" != "yes"; then XE_DIE(["Unable to find headers for --with-xft"]) else @@ -3525,12 +3540,15 @@ [XE_DIE(["Unable to find libfontconfig for --with-xft"])]) AC_CHECK_LIB(Xft, XftFontOpen, XE_PREPEND(-lXft, libs_x), [XE_DIE(["Unable to find libXft for --with-xft"])]) + + AC_CHECK_FUNCS(FcConfigGetRescanInterval) + AC_CHECK_FUNCS(FcConfigSetRescanInterval) dnl #### detect fontconfig properly!!!! with_fontconfig=yes AC_DEFINE(HAVE_FONTCONFIG) AC_DEFINE(USE_XFT) dnl Due to interactions with other libraries, must postpone AC_DEFINE - dnl of USE_XFT_MENUBARS, USE_XFT_TABS, and USE_XFT_GAUGE. + dnl of USE_XFT_MENUBARS, USE_XFT_TABS, and USE_XFT_GAUGES. unset xft_includes_found fi fi @@ -4226,17 +4244,17 @@ AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb, [ dnl Must not be a 3d library... - AC_CHECK_LIB($athena_variant, threeDClassRec, + AC_CHECK_LIB($athena_variant, XawSme3dComputeTopShadowRGB, [AC_MSG_WARN([Could not find a non-3d Athena widget library.])], athena_lib=$athena_variant) ], AC_MSG_WARN([Could not find an Athena widget library.])) else dnl The real configuration, need 3d library - AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant, + AC_CHECK_LIB($athena_variant, XawSme3dComputeTopShadowRGB, athena_lib=$athena_variant, dnl OK, couldn't find it with a proper name, try the standard Athena lib dnl If that is 3d, presume the user asked for what they have installed. - AC_CHECK_LIB(Xaw, threeDClassRec, + AC_CHECK_LIB(Xaw, XawSme3dComputeTopShadowRGB, [ athena_lib=Xaw; AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]); @@ -4419,11 +4437,11 @@ fi fi dnl this is not in xft reloaded #3 -if test "$with_xft_gauge" != "no" ; then +if test "$with_xft_gauges" != "no" ; then if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then - with_xft_gauge="yes" + with_xft_gauges="yes" else - with_xft_gauge="no" + with_xft_gauges="no" fi fi @@ -4516,7 +4534,7 @@ test "$with_xft_menubars" = "yes" && AC_DEFINE(USE_XFT_MENUBARS) test "$with_xft_tabs" = "yes" && AC_DEFINE(USE_XFT_TABS) -test "$with_xft_gauge" = "yes" && AC_DEFINE(USE_XFT_GAUGE) +test "$with_xft_gauges" = "yes" && AC_DEFINE(USE_XFT_GAUGES) dnl ---------------------- dnl Mule-dependent options @@ -5398,10 +5416,13 @@ if test "$enable_database_gdbm" != "no"; then AC_CHECK_LIB(gdbm, dbm_open, [ enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm], [ + AC_CHECK_LIB(gdbm_compat, dbm_open, [ + enable_database_gdbm=yes enable_database_dbm=no libdbm="-lgdbm_compat -lgdbm"], [ if test "$enable_database_gdbm" = "yes"; then XE_DIE("Required GNU DBM support cannot be provided.") fi - enable_database_gdbm=no]) + enable_database_gdbm=no], -lgdbm) + ]) fi dnl Check for DBM support in libc and libdbm. @@ -5482,7 +5503,7 @@ fi dnl Berk db 4.1 decorates public functions with version information - if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then + if test "$enable_database_berkdb" = "yes" -a "$dbver" = "4"; then rm -f $tempcname echo "#include <$db_h_file>" > $tempcname echo "configure___ dbfunc=db_create" >> $tempcname @@ -5709,6 +5730,7 @@ AC_SUBST(instvardir) AC_SUBST(srcdir) AC_SUBST(bindir) +AC_SUBST(datarootdir) AC_SUBST(datadir) AC_SUBST(statedir) AC_SUBST(libdir) @@ -5746,6 +5768,7 @@ AC_SUBST(infopath,$with_infopath) AC_SUBST(INFOPATH_USER_DEFINED) XE_EXPAND_VARIABLE(with_info_path,INFOPATH) +AC_SUBST(INFOPATH) test -n "$with_user_packages" && with_early_packages=$with_user_packages AC_SUBST(early_packages,$with_early_packages) @@ -6063,7 +6086,7 @@ echo " - Using Xft to render antialiased fonts in tab controls." echo " WARNING: This feature will be replaced with a face." fi -if test "$with_xft_gauge" = "yes"; then +if test "$with_xft_gauges" = "yes"; then echo " - Using Xft to render antialiased fonts in progress bars." echo " WARNING: This feature will be replaced with a face." echo " WARNING: This feature not yet implemented; setting ignored." diff -r 71bf2c5667ba -r 66411359ce4e etc/ChangeLog --- a/etc/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/etc/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,71 @@ +2008-08-10 Aidan Kehoe + + * HELLO: Add a coding cookie, now the UTF-8 sequences prevent the + file being recognised as ISO-2022-7 automatically. + +2008-08-05 Aidan Kehoe + + * HELLO: Encode the Arabic using UTF-8 sequences, not ISO-8859-6. + +2008-02-21 Stephen J. Turnbull + + * README: Add descriptions of Daniel Polansky's icons. + +2008-02-21 Daniel Polansky + + Two images for one icon for XEmacs, one 16x16 and 32x32. + Also, a Microsoft Windows icon file is attached. + Itemized: + - 16x16 icon in PNG + - 32x32 icon in PNG + - Both bundled as a Microsoft Windows icon. + + The images are modeled on XEmacs violet logotype, as found at + http://www.xemacs.org/. The images are copyright (c) 2005 by + Daniel Polansky, and licensed under GNU General Public Licence V2 + or later at your option. + + * xemacs-X-16.png: + * xemacs-X-32.png: + * xemacs-X.ico: + New files. + +2008-02-20 Stephen J. Turnbull + + * README: Give more accurate descriptions of image files. + +2007-12-26 Stephen J. Turnbull + + * bundled-packages/README: Document restriction on --with-late-packages. + +2007-12-23 Stephen J. Turnbull + + * bundled-packages/README: Documentation for bundled packages. + * bundled-packages/test.sh: Test suite for bundled packages. + +2007-11-22 Vin Shelton + + * photos/vin.png: + * photos/vinm.png: Updated. + +2004-12-03 Shyamal Prasad + + * xemacs.1: Now describe $HOME/.xemacs/init.el as the + preferred init file. Fixed excessive space insertion + in the description of the '-vanilla' option + +2007-09-19 Didier Verna + + * photos/dv.png: Remove. + * photos/didier.png: Add. + +2007-07-28 Aidan Kehoe + + * unicode/unicode-consortium/BIG5.TXT: + Don't map any characters to U+FFFD; for round trip compatibility, + map those that were mapped to U+FFFD to the Unicode private use + area. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. @@ -40,14 +108,14 @@ 2006-12-21 Aidan Kehoe * unicode/unicode-consortium/8859-7.TXT: - Update the mapping to the 2003 version of ISO 8859-7. + Update the mapping to the 2003 version of ISO 8859-7. 2006-11-11 Aidan Kehoe * NEWS: Add information on set-charset-registries, and the change to - define-specifier-tag. - + define-specifier-tag. + 2006-10-08 Adrian Aichner * TUTORIAL.de: Small rephrasing as suggested by hroptatyr on @@ -91,7 +159,7 @@ * HELLO: Add Irish, Tajik. Don't give the local name for the latter language, because we don't support CYRILLIC SMALL LETTER CHE WITH DESCENDER nor CYRILLIC SMALL LETTER I WITH MACRON by - default. + default. 2005-11-16 Malcolm Purvis @@ -112,7 +180,7 @@ 2005-07-17 Aidan Kehoe * NEWS: Add information on the last argument to event-to-character - being ignored. + being ignored. 2005-05-28 Stephen J. Turnbull @@ -124,7 +192,7 @@ 2005-03-24 Aidan Kehoe - * NEWS: Mention the move to XEmacs as the application class. + * NEWS: Mention the move to XEmacs as the application class. * sample.Xresources: Emacs as app class -> XEmacs as app class 2005-03-23 Adrian Aichner @@ -281,7 +349,7 @@ 2003-07-03 Stephen J. Turnbull - * etc/README.HYPERBOLE: + * etc/README.HYPERBOLE: * etc/README.OO-BROWSER: Update. @@ -310,7 +378,7 @@ * package-index.LATEST.gpg: Updated to current reality. * package-index.LATEST.pgp: Removed, 21.5 uses - 'package-index.LATEST.gpg'. + 'package-index.LATEST.gpg'. 2003-04-24 Steve Youngs @@ -829,12 +897,12 @@ 1999-11-13 Jason R Mastaler * FTP: Updated FTP mirrors list. Replaced GNU FTP document - with a URL. + with a URL. 1999-11-13 Jason R Mastaler * MAILINGLISTS: Updated mailing list subscription information. - Replaced GNU MAILINGLISTS document with a URL. + Replaced GNU MAILINGLISTS document with a URL. 1999-08-01 Adrian Aichner @@ -921,7 +989,7 @@ * README: Bump version numbers. * NEWS: Ditto and purge pre-21.0 stuff. - * XEmacs 21.0-pre5 is released. + * XEmacs 21.0-pre5 is released. 1998-07-09 SL Baur @@ -1934,4 +2002,3 @@ Thu Dec 5 20:42:35 1996 Steven L Baur * edt-user.doc (File): New file from Emacs 19.34. - diff -r 71bf2c5667ba -r 66411359ce4e etc/HELLO --- a/etc/HELLO Sat Oct 25 20:35:36 2008 +0900 +++ b/etc/HELLO Sat Oct 25 21:40:46 2008 +0900 @@ -1,9 +1,11 @@ +-*- coding: iso-2022-7 -*- + You need many fonts to read all. Please correct this incomplete list and add more! --------------------------------------------------------- Amharic ($(3"c!(B -Arabic [2](38R(47d(3T!JSa(4W(3W[0](B +Arabic (%Gةّيبرعلا%@) %Gمكيلع%@ %Gمالّسلا%@ Croatian (Hrvatski) Bog (Bok), Dobar dan Czech (,Bh(Besky) Dobr,B}(B den Danish (Dansk) Hej, Goddag diff -r 71bf2c5667ba -r 66411359ce4e etc/README --- a/etc/README Sat Oct 25 20:35:36 2008 +0900 +++ b/etc/README Sat Oct 25 21:40:46 2008 +0900 @@ -17,7 +17,7 @@ TUTORIAL.* Tutorials in non-English languages VEGETABLES XEmacs 21.5 code names XKeysymDB X Keysym Database with Motif bindings -cbx.png "Created by XEmacs" logo +cbx.png "Created by XEmacs" logo (150x54 8bpp) ctags.1 Ctags man page custom/ Images used in Custom mode editclient.sh Either start up XEmacs or connect to a running one @@ -30,12 +30,12 @@ gnudoit.1 Gnudoit man page gnuserv.1 Gnuserv man page gnuserv.README Original README file from gnuserv -gray1.xbm Gray bitmap +gray1.xbm Halftone gray bitmap (16x16) idd/ ? package-index.LATEST.gpg ? photos/* Various pictures of XEmacs developers -recycle.xpm -recycle2.xpm Two versions of oversized Recycle cursor +recycle.xpm Chartreuse recycle cursor (51x51) +recycle2.xpm Chartreuse recycle cursor (32x32) refcard.ps.gz Postscript version of XEmacs reference card refcard.tex XEmacs reference card sample.Xdefaults (legacy -- to be removed) @@ -44,15 +44,18 @@ sparcworks/ Support files for Sparcworks tests/ Testcases for external widget toolbar/ Image files for the toolbar -trash.xpm Garbage can icon +trash.xpm B&W garbage can icon (32x46) unicode/ Unicode conversion tables -xemacs-beta.xpm XEmacs Beta logo -xemacs-enhanced.png "XEmacs-enhanced" logo +xemacs-X-16.png Violet boxed X icon (16x16) +xemacs-X-32.png Violet boxed X icon (32x32) +xemacs-X.ico Violet boxed X icon in MS Windows format +xemacs-beta.xpm XEmacs Beta logo for splashscreen (388x145) +xemacs-enhanced.png "XEmacs-enhanced" logo (90x32) xemacs-fe.sh XEmacs frontend driver -xemacs-icon.xpm -xemacs-icon2.xbm -xemacs-icon2.xpm -xemacs-icon3.xpm Various versions of an XEmacs WM icon +xemacs-icon.xpm Color XE on page icon (48x48) +xemacs-icon2.xbm B&W kitchen sink icon (50x50) +xemacs-icon2.xpm Color kitchen sink icon (50x50) +xemacs-icon3.xpm Grayscale X icon (48x48) xemacs.1 XEmacs man page -xemacs.xbm -xemacs.xpm XEmacs logo used on the splash screen +xemacs.xbm Half-tone XEmacs logo (266x61) +xemacs.xpm XEmacs logo for splashscreen (388x145) diff -r 71bf2c5667ba -r 66411359ce4e etc/bundled-packages/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/bundled-packages/README Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,71 @@ +Package distributions may be placed in this directory. +If present and a package-path is configured, packages can be installed +using the top-level Makefile. + +To configure the package path, use the --with-late-packages option to +configure, which specifies a single directory in which to install the +xemacs-packages and mule-packages hierarchies provided. If this is null, +or contains a Unix-style search path (i.e., a colon is present in the +argument of the --with-late-packages option), you will have to install +the packages by hand. + +To find out if a distribution includes bundled packages, type + + make check-available-packages + +There are three Make targets that may be available depending on the package +sets supplied. + + make install-bootstrap-packages + Install a selected set of packages sufficient to support + downloading and installing packages via the M-x list-packages + interface. Chose this if you want to be able to install the + latest version of each package immediately. + + make install-nomule-packages + Install the full distribution of packages that do not require a + Mule-enabled XEmacs. Choose this package if you don't have a + Mule-enabled XEmacs and want the convenience of a single-command + installation. You can add or update packages via M-x list-packages + at any time. + + make install-all-packages + Install the full distribution of packages, including those requiring + a Mule-enabled XEmacs. Choose this package if you have a Mule- + enabled XEmacs and want the convenience of a single-command + installation. You can add or update packages via M-x list-packages + at any time. + +DISTRIBUTOR'S NOTE: you may choose what packages you wish to include in +bootstrap.tar.gz, but to make list-packages work you need to include at +least xemacs-base, dired, and efs. The tarball should unpack directly as +an xemacs-packages tree (and optionaly, a mule-packages tree. Also, if +either of xemacs-sumo.tar.gz or xemacs-mule-sumo.tar.gz is provided, the +other should be as well. + +If packages are not available with the distribution, you can get them at + + ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz + ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz + http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/bootstrap.tar.gz + +and place them in the same directory as this file. You can also make your +own bootstrap.tar.gz by creating a directory xemacs-packages, then +untarring the packages of your choice into that directory, and tarring the +whole thing up with "tar czf bootstrap.tar.gz xemacs-packages". (If you +wish to include mule-packages, you should place them in mule-packages as +a sibling of xemacs-packages.) + +This facility currently does not support installations which configure +the --with-early-packages, --with-late-packages, or --with-last-packages +options. + +This facility currently will not overwrite an existing package +installation, not even if a whole hierarchy (usually the mule-packages) +is missing. In particular, you cannot use this feature to add the +mule-packages to a package installation which lacks them, even if the +hierarchy is missing, or the xemacs-packages hierarchy was installed +this way. Nor can you "upgrade" a bootstrap installation to a full +installation. If you wish to do any of these things you will need to +remove the existing hierarchies. + diff -r 71bf2c5667ba -r 66411359ce4e etc/bundled-packages/test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/bundled-packages/test.sh Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,105 @@ +# tests for the bundled packages feature + +# usage: sh etc/bundled-packages/tests.sh [TMP_TEST_DIR] + +# Always run this script from the top directory of the source tree. +# You need a mv that supports the -v for verbose flag, and a mkdir that +# supports the -p flag to make parents. +# Output from this script is preceded by 4 stars (****). + +# This test script is probably more fragile than the build process, but if +# it runs to completion things are probably OK. + +# configure the installation target + +if test -z "$1"; then + TMP_TEST_DIR=/tmp/test/bundled-packages +else + TMP_TEST_DIR=$1 +fi + +srcdir=`pwd` +blddir=${TMP_TEST_DIR}/build +pkgdir=${TMP_TEST_DIR}/lib/xemacs + +echo "**** srcdir = ${srcdir}" +echo "**** blddir = ${blddir}" +echo "**** pkgdir = ${pkgdir}" + +if test -e "${pkgdir}"; then + echo "**** pkgdir (${pkgdir}) exists; bailing out." + exit -1 +fi + +# mv existing tarballs out of harm's way and make a fake one + +echo "**** Moving existing tarballs to etc/bundled-packages/saved." +mkdir -p etc/bundled-packages/saved +cd etc/bundled-packages +echo "**** 'mv' may error because there are no files to move. It's harmless." +mv -v *.tar.gz saved/ +cd ../.. + +# configure in a temporary directory + +if test -e ${blddir}; then + echo "**** blddir (${blddir}) exists; bailing out." + exit -1 +fi +mkdir -p ${blddir} +cd ${blddir} +echo "**** Running 'configure'. This takes *several minutes*." +echo "**** Redirecting configure output to ${blddir}/beta.err." +${srcdir}/configure >beta.err 2>&1 + +# test check-available-packages + +echo "**** This test should produce no error and no output." +make check-available-packages +cd ${srcdir}/etc/bundled-packages +echo "**** This test should explain how to install bootstrap packages." +echo "This file pretends to be a bootstrap hierarchy." > xemacs-packages +tar czf bootstrap.tar.gz xemacs-packages +rm xemacs-packages +cd ${blddir} +make check-available-packages +echo "**** This test should explain how to install all three." +cd ${srcdir}/etc/bundled-packages +echo "This file pretends to be a xemacs-packages hierarchy." > xemacs-packages +echo "This file pretends to be a mule-packages hierarchy." > mule-packages +tar czf xemacs-sumo.tar.gz xemacs-packages +tar czf xemacs-mule-sumo.tar.gz mule-packages +rm xemacs-packages mule-packages +cd ${blddir} +make check-available-packages + +# test installation without package path given + +echo "**** Make the 'make-path' utility needed by the installation routine." +make -C lib-src make-path +echo "**** This test should error because --with-late-packages wasn't given." +make install-bootstrap-packages + +# test installation with package path given + +echo "**** Running 'configure'. This takes *several minutes*." +echo "**** Redirecting configure output to ${blddir}/beta.err." +${srcdir}/configure --with-late-packages=${pkgdir} >beta.err 2>&1 +echo "**** Make the 'make-path' utility needed by the installation routine." +make -C lib-src make-path +echo "**** Test install-bootstrap-packages." +make install-bootstrap-packages +echo "**** The following should list xemacs-packages in the right place." +ls ${pkgdir}/* + +#### no tests below this line #### + +# put tarballs back and clean up + +cd ${srcdir}/etc/bundled-packages +rm *.tar.gz +echo "**** 'mv' may error because there are no files to move. It's harmless." +mv -v saved/*.tar.gz ../ +rmdir saved +rm -rf ${blddir} ${pkgdir} +exit 0 diff -r 71bf2c5667ba -r 66411359ce4e etc/photos/didier.png Binary file etc/photos/didier.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/photos/dv.png Binary file etc/photos/dv.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/photos/vin.png Binary file etc/photos/vin.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/photos/vinm.png Binary file etc/photos/vinm.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/unicode/unicode-consortium/BIG5.TXT --- a/etc/unicode/unicode-consortium/BIG5.TXT Sat Oct 25 20:35:36 2008 +0900 +++ b/etc/unicode/unicode-consortium/BIG5.TXT Sat Oct 25 21:40:46 2008 +0900 @@ -58,6 +58,11 @@ # We currently map all of these characters to U+FFFD REPLACEMENT CHARACTER. # It is also possible to map these characters to their duplicates, or to # the user zone. +# +# XEmacs change; we map them to private use characters above +# U+F0000. 0xA15A => U+FA15A, and so on. See +# http://mid.gmane.org/s3tsl7j7zg9.fsf@magellan.suse.de and related +# discussion. # # Notes: # @@ -118,7 +123,7 @@ 0xA157 0xFE31 # PRESENTATION FORM FOR VERTICAL EM DASH 0xA158 0x2014 # EM DASH 0xA159 0xFE33 # PRESENTATION FORM FOR VERTICAL LOW LINE -0xA15A 0xFFFD # *** NO MAPPING *** +0xA15A 0xFA15A # #### PRIVATE USE 0xA15B 0xFE34 # PRESENTATION FORM FOR VERTICAL WAVY LOW LINE 0xA15C 0xFE4F # WAVY LOW LINE 0xA15D 0xFF08 # FULLWIDTH LEFT PARENTHESIS @@ -189,9 +194,9 @@ 0xA1C0 0x32A3 # CIRCLED IDEOGRAPH CORRECT 0xA1C1 0x2105 # CARE OF 0xA1C2 0x203E # OVERLINE -0xA1C3 0xFFFD # *** NO MAPPING *** +0xA1C3 0xFA1C3 # #### PRIVATE USE 0xA1C4 0xFF3F # FULLWIDTH LOW LINE -0xA1C5 0xFFFD # *** NO MAPPING *** +0xA1C5 0xFA1C5 # #### PRIVATE USE 0xA1C6 0xFE49 # DASHED OVERLINE 0xA1C7 0xFE4A # CENTRELINE OVERLINE 0xA1C8 0xFE4D # DASHED LOW LINE @@ -248,8 +253,8 @@ 0xA1FB 0x2198 # SOUTH EAST ARROW 0xA1FC 0x2225 # PARALLEL TO 0xA1FD 0x2223 # DIVIDES -0xA1FE 0xFFFD # *** NO MAPPING *** -0xA240 0xFFFD # *** NO MAPPING *** +0xA1FE 0xFA1FE # #### PRIVATE USE +0xA240 0xFA240 # #### PRIVATE USE 0xA241 0xFF0F # FULLWIDTH SOLIDUS 0xA242 0xFF3C # FULLWIDTH REVERSE SOLIDUS 0xA243 0xFF04 # FULLWIDTH DOLLAR SIGN @@ -355,9 +360,9 @@ 0xA2C9 0x3027 # HANGZHOU NUMERAL SEVEN 0xA2CA 0x3028 # HANGZHOU NUMERAL EIGHT 0xA2CB 0x3029 # HANGZHOU NUMERAL NINE -0xA2CC 0xFFFD # *** NO MAPPING *** +0xA2CC 0xFA2CC # #### PRIVATE USE 0xA2CD 0x5344 # -0xA2CE 0xFFFD # *** NO MAPPING *** +0xA2CE 0xFA2CE # #### PRIVATE USE 0xA2CF 0xFF21 # FULLWIDTH LATIN CAPITAL LETTER A 0xA2D0 0xFF22 # FULLWIDTH LATIN CAPITAL LETTER B 0xA2D1 0xFF23 # FULLWIDTH LATIN CAPITAL LETTER C diff -r 71bf2c5667ba -r 66411359ce4e etc/xemacs-X-16.png Binary file etc/xemacs-X-16.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/xemacs-X-32.png Binary file etc/xemacs-X-32.png has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/xemacs-X.ico Binary file etc/xemacs-X.ico has changed diff -r 71bf2c5667ba -r 66411359ce4e etc/xemacs.1 --- a/etc/xemacs.1 Sat Oct 25 20:35:36 2008 +0900 +++ b/etc/xemacs.1 Sat Oct 25 21:40:46 2008 +0900 @@ -147,12 +147,7 @@ .TP .B \-vanilla Load no extra files at startup. Equivalent to the combination of -.B \-q -, -.B \-no-site-file -, and -.B \-no-early-packages -\. +.BR \-q ", " \-no-site-file ", and " \-no-early-packages . .TP .BI \-u " user, " \-user " user" Load @@ -628,7 +623,8 @@ META-left Make a rectangular selection. .SH FILES Lisp code is read at startup from the user's init file, -\fB$HOME/.emacs\fP. +\fB$HOME/.xemacs/init.el\fP. If this file does not exist then +\fB$HOME/.emacs\fP will be read if it is present. /usr/local/info - files for the Info documentation browser (a subsystem of diff -r 71bf2c5667ba -r 66411359ce4e install-sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,519 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e install.sh --- a/install.sh Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,236 +0,0 @@ -#!/bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5. -# -# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ -# -# This script is compatible with the BSD install script, but was written -# from scratch. -# - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -tranformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff -r 71bf2c5667ba -r 66411359ce4e lib-src/ChangeLog --- a/lib-src/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,39 @@ +2008-05-21 Aidan Kehoe + + * make-mswin-unicode.pl: + Check %WindowsSdkDir%, %MSSddk% for the Windows header files too. + +2008-05-14 Vin Shelton + + * winclient.c: Create CONNECT_RETRIES and increase retry count + from 5 to 10. + +2008-05-13 Aidan Kehoe + + * make-docfile.c (scan_file): + Pass READ_BINARY to scan_lisp_file, scan_c_file; avoids an + assertion failure with Visual C++ 2005 Express Edition, and is + logically more coherent, given that our Lisp and C files are saved + with Unix line endings. + +2007-08-27 Mike Sperber + + * config.values.in (datarootdir): Add. + +2007-08-12 Mike Sperber + + * Makefile.in.in (datarootdir): Add. + +2007-05-29 Stephen J. Turnbull + + * etags.c: Sync to pot_etags_version 17.33. + Reverts part of 2007-03-24 patch: no longer displays + pot_etags_version in usage message. + +2007-05-22 Jerry James + + * ellcc.c (do_init_mode): Plug memory leak. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e lib-src/Makefile.in.in --- a/lib-src/Makefile.in.in Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/Makefile.in.in Sat Oct 25 21:40:46 2008 +0900 @@ -56,6 +56,7 @@ libdir=@libdir@ srcdir=@srcdir@ datadir=@datadir@ +datarootdir=@datarootdir@ instvardir=@instvardir@ top_srcdir=@top_srcdir@ archlibdir=@archlibdir@ diff -r 71bf2c5667ba -r 66411359ce4e lib-src/config.values.in --- a/lib-src/config.values.in Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/config.values.in Sat Oct 25 21:40:46 2008 +0900 @@ -15,177 +15,6 @@ ;;; Variables defined in configure by AC_SUBST follow: ;;; (These are used in Makefiles) -ALLOCA "@ALLOCA@" -ARCHLIBDIR "@ARCHLIBDIR@" -ARCHLIBDIR_USER_DEFINED "@ARCHLIBDIR_USER_DEFINED@" -CC "@CC@" -CFLAGS "@CFLAGS@" -CPP "@CPP@" -CPPFLAGS "@CPPFLAGS@" -DEFS "@DEFS@" -DOCDIR "@DOCDIR@" -DOCDIR_USER_DEFINED "@DOCDIR_USER_DEFINED@" -EARLY_PACKAGE_DIRECTORIES "@EARLY_PACKAGE_DIRECTORIES@" -EARLY_PACKAGE_DIRECTORIES_USER_DEFINED "@EARLY_PACKAGE_DIRECTORIES_USER_DEFINED@" -ECHO_C "@ECHO_C@" -ECHO_N "@ECHO_N@" -ECHO_T "@ECHO_T@" -EGREP "@EGREP@" -ETCDIR "@ETCDIR@" -ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@" -EXEC_PREFIX "@EXEC_PREFIX@" -EXEC_PREFIX_USER_DEFINED "@EXEC_PREFIX_USER_DEFINED@" -EXEEXT "@EXEEXT@" -GTK_CONFIG "@GTK_CONFIG@" -INFODIR "@INFODIR@" -INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@" -INFOPATH "@INFOPATH@" -INFOPATH_USER_DEFINED "@INFOPATH_USER_DEFINED@" -INSTALL "@INSTALL@" -INSTALLPATH "@INSTALLPATH@" -INSTALL_ARCH_DEP_SUBDIR "@INSTALL_ARCH_DEP_SUBDIR@" -INSTALL_DATA "@INSTALL_DATA@" -INSTALL_PROGRAM "@INSTALL_PROGRAM@" -INSTALL_SCRIPT "@INSTALL_SCRIPT@" -LAST_PACKAGE_DIRECTORIES "@LAST_PACKAGE_DIRECTORIES@" -LAST_PACKAGE_DIRECTORIES_USER_DEFINED "@LAST_PACKAGE_DIRECTORIES_USER_DEFINED@" -LATE_PACKAGE_DIRECTORIES "@LATE_PACKAGE_DIRECTORIES@" -LATE_PACKAGE_DIRECTORIES_USER_DEFINED "@LATE_PACKAGE_DIRECTORIES_USER_DEFINED@" -LDFLAGS "@LDFLAGS@" -LIBOBJS "@LIBOBJS@" -LIBS "@LIBS@" -LIBSTDCPP "@LIBSTDCPP@" -LISPDIR "@LISPDIR@" -LISPDIR_USER_DEFINED "@LISPDIR_USER_DEFINED@" -LN_S "@LN_S@" -LTLIBOBJS "@LTLIBOBJS@" -MAKE_DOCFILE "@MAKE_DOCFILE@" -MAKE_SUBDIR "@MAKE_SUBDIR@" -MODARCHDIR "@MODARCHDIR@" -MODCFLAGS "@MODCFLAGS@" -MODULEDIR "@MODULEDIR@" -MODULEDIR_USER_DEFINED "@MODULEDIR_USER_DEFINED@" -MOD_CC "@MOD_CC@" -MOD_INSTALL_PROGRAM "@MOD_INSTALL_PROGRAM@" -OBJECT_TO_BUILD "@OBJECT_TO_BUILD@" -OBJEXT "@OBJEXT@" -PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" -PACKAGE_NAME "@PACKAGE_NAME@" -PACKAGE_PATH "@PACKAGE_PATH@" -PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@" -PACKAGE_STRING "@PACKAGE_STRING@" -PACKAGE_TARNAME "@PACKAGE_TARNAME@" -PACKAGE_VERSION "@PACKAGE_VERSION@" -PATH_SEPARATOR "@PATH_SEPARATOR@" -PREFIX "@PREFIX@" -PREFIX_USER_DEFINED "@PREFIX_USER_DEFINED@" -PROGNAME "@PROGNAME@" -RANLIB "@RANLIB@" -RECURSIVE_MAKE_ARGS "@RECURSIVE_MAKE_ARGS@" -SET_MAKE "@SET_MAKE@" -SHELL "@SHELL@" -SITELISPDIR "@SITELISPDIR@" -SITELISPDIR_USER_DEFINED "@SITELISPDIR_USER_DEFINED@" -SITEMODULEDIR "@SITEMODULEDIR@" -SITEMODULEDIR_USER_DEFINED "@SITEMODULEDIR_USER_DEFINED@" -SRC_SUBDIR_DEPS "@SRC_SUBDIR_DEPS@" -SUBDIR_MAKEFILES "@SUBDIR_MAKEFILES@" -XEMACS_CC "@XEMACS_CC@" -XE_CFLAGS "@XE_CFLAGS@" -X_CFLAGS "@X_CFLAGS@" -X_EXTRA_LIBS "@X_EXTRA_LIBS@" -X_LIBS "@X_LIBS@" -X_PRE_LIBS "@X_PRE_LIBS@" -YACC "@YACC@" -abs_builddir "@abs_builddir@" -abs_srcdir "@abs_srcdir@" -abs_top_builddir "@abs_top_builddir@" -abs_top_srcdir "@abs_top_srcdir@" -ac_ct_CC "@ac_ct_CC@" -ac_ct_RANLIB "@ac_ct_RANLIB@" -archlibdir "@archlibdir@" -bindir "@bindir@" -bitmapdir "@bitmapdir@" -blddir "@blddir@" -build "@build@" -build_alias "@build_alias@" -build_cpu "@build_cpu@" -build_os "@build_os@" -build_vendor "@build_vendor@" -builddir "@builddir@" -c_switch_all "@c_switch_all@" -c_switch_general "@c_switch_general@" -c_switch_window_system "@c_switch_window_system@" -canna_libs "@canna_libs@" -configuration "@configuration@" -configure_input "@configure_input@" -datadir "@datadir@" -dll_cflags "@dll_cflags@" -dll_ld "@dll_ld@" -dll_ldflags "@dll_ldflags@" -dll_ldo "@dll_ldo@" -dll_post "@dll_post@" -dnd_objs "@dnd_objs@" -docdir "@docdir@" -dynodump_arch "@dynodump_arch@" -early_packages "@early_packages@" -etcdir "@etcdir@" -exec_prefix "@exec_prefix@" -extra_includes "@extra_includes@" -extra_objs "@extra_objs@" -have_esd_config "@have_esd_config@" -host_alias "@host_alias@" -includedir "@includedir@" -infodir "@infodir@" -infopath "@infopath@" -install_pp "@install_pp@" -inststaticdir "@inststaticdir@" -instvardir "@instvardir@" -internal_makefile_list "@internal_makefile_list@" -last_packages "@last_packages@" -late_packages "@late_packages@" -ld "@ld@" -ld_dynamic_link_flags "@ld_dynamic_link_flags@" -ld_libs_all "@ld_libs_all@" -ld_libs_general "@ld_libs_general@" -ld_libs_window_system "@ld_libs_window_system@" -ld_switch_all "@ld_switch_all@" -ld_switch_general "@ld_switch_general@" -ld_switch_shared "@ld_switch_shared@" -ld_switch_window_system "@ld_switch_window_system@" -ldap_libs "@ldap_libs@" -lib_gcc "@lib_gcc@" -libdir "@libdir@" -libexecdir "@libexecdir@" -libs_xauth "@libs_xauth@" -lispdir "@lispdir@" -localstatedir "@localstatedir@" -lwlib_objs "@lwlib_objs@" -machfile "@machfile@" -mandir "@mandir@" -moduledir "@moduledir@" -native_sound_lib "@native_sound_lib@" -oldincludedir "@oldincludedir@" -opsysfile "@opsysfile@" -package_path "@package_path@" -postgresql_libs "@postgresql_libs@" -prefix "@prefix@" -program_transform_name "@program_transform_name@" -sbindir "@sbindir@" -sharedstatedir "@sharedstatedir@" -sitelispdir "@sitelispdir@" -sitemoduledir "@sitemoduledir@" -sound_cflags "@sound_cflags@" -srcdir "@srcdir@" -start_files "@start_files@" -start_flags "@start_flags@" -statedir "@statedir@" -sysconfdir "@sysconfdir@" -target_alias "@target_alias@" -top_builddir "@top_builddir@" -top_srcdir "@top_srcdir@" -version "@version@" -with_modules "@with_modules@" ;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow: ;;; (These are used in C code) diff -r 71bf2c5667ba -r 66411359ce4e lib-src/ellcc.c --- a/lib-src/ellcc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/ellcc.c Sat Oct 25 21:40:46 2008 +0900 @@ -719,8 +719,13 @@ { mdocprog = xnew (14 + strlen (ELLCC_ARCHDIR), char); sprintf (mdocprog, "%s/make-docfile", ELLCC_ARCHDIR); + exec_argv = add_to_argv (exec_argv, mdocprog); + free (mdocprog); } - exec_argv = add_to_argv (exec_argv, mdocprog); + else + { + exec_argv = add_to_argv (exec_argv, mdocprog); + } ts = xnew (4 + strlen (mod_output), char); sprintf (ts, "-E %s", mod_output); exec_argv = add_to_argv (exec_argv, ts); diff -r 71bf2c5667ba -r 66411359ce4e lib-src/etags.c --- a/lib-src/etags.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/etags.c Sat Oct 25 21:40:46 2008 +0900 @@ -80,7 +80,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.32"; +char pot_etags_version[] = "@(#) pot revision number is 17.33"; #define TRUE 1 #define FALSE 0 @@ -882,7 +882,7 @@ # define EMACS_NAME "standalone" #endif #ifndef VERSION -# define VERSION "17.32" +# define VERSION "17.33" #endif static void print_version () @@ -894,6 +894,10 @@ exit (EXIT_SUCCESS); } +#ifndef PRINT_UNDOCUMENTED_OPTIONS_HELP +# define PRINT_UNDOCUMENTED_OPTIONS_HELP FALSE +#endif + static void print_help (argbuffer) argument *argbuffer; @@ -976,6 +980,11 @@ puts ("--no-globals\n\ Do not create tag entries for global variables in some\n\ languages. This makes the tags file smaller."); + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("--no-line-directive\n\ + Ignore #line preprocessor directives in C and derived languages."); + if (CTAGS) puts ("--members\n\ Create tag entries for members of structures in some languages."); @@ -996,13 +1005,17 @@ MODS are optional one-letter modifiers: `i' means to ignore case,\n\ `m' means to allow multi-line matches, `s' implies `m' and\n\ causes dot to match any character, including newline."); + puts ("-R, --no-regex\n\ Don't create tags from regexps for the following files."); + puts ("-I, --ignore-indentation\n\ In C and C++ do not assume that a closing brace in the first\n\ column is the final brace of a function or structure definition."); + puts ("-o FILE, --output=FILE\n\ Write the tags to FILE."); + puts ("--parse-stdin=NAME\n\ Read from standard input and record tags as belonging to file NAME."); @@ -1030,13 +1043,16 @@ Print on the standard output an index of items intended for\n\ human consumption, similar to the output of vgrind. The index\n\ is sorted, and gives the page number of each item."); -# if PRINT_UNDOCUMENTED_OPTIONS_HELP - puts ("-w, --no-duplicates\n\ + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("-w, --no-duplicates\n\ Do not create duplicate tag entries, for compatibility with\n\ traditional ctags."); - puts ("-w, --no-warn\n\ + + if (PRINT_UNDOCUMENTED_OPTIONS_HELP) + puts ("-w, --no-warn\n\ Suppress warning messages about duplicate tag entries."); -# endif /* PRINT_UNDOCUMENTED_OPTIONS_HELP */ + puts ("-x, --cxref\n\ Like --vgrind, but in the style of cxref, rather than vgrind.\n\ The output uses line numbers instead of page numbers, but\n\ diff -r 71bf2c5667ba -r 66411359ce4e lib-src/make-docfile.c --- a/lib-src/make-docfile.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/make-docfile.c Sat Oct 25 21:40:46 2008 +0900 @@ -306,12 +306,12 @@ else if (ellcc == 0 && len > 3 && !strcmp (filename + len - 3, ".el")) { Current_file_type = el_file; - return scan_lisp_file (filename, READ_TEXT); + return scan_lisp_file (filename, READ_BINARY); } else { Current_file_type = c_file; - return scan_c_file (filename, READ_TEXT); + return scan_c_file (filename, READ_BINARY); } } diff -r 71bf2c5667ba -r 66411359ce4e lib-src/make-mswin-unicode.pl --- a/lib-src/make-mswin-unicode.pl Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/make-mswin-unicode.pl Sat Oct 25 21:40:46 2008 +0900 @@ -104,7 +104,17 @@ $options{"includedir"}); if (!$dir) { - $dir=$ENV{"MSVCDIR"} or die "Environment variable MSVCDIR undefined - run vcvars32.bat from your MSVC installation"; + for my $sdkroot (("WindowsSdkDir", "MSSdk", "MSVCDIR")) + { + if (defined $ENV{$sdkroot}) { + $dir = $ENV{$sdkroot}; + last; + } + } + unless (defined $dir) + { + die "Can't find the Windows SDK headers; run vcvars32.bat from your MSVC installation, or setenv.cmd from the Platform SDK installation"; + } $dir.='/include'; } die "Can't find MSVC include files in \"$dir\"" unless ((-f $dir.'/WINDOWS.H') || (-f $dir.'/windows.h')); diff -r 71bf2c5667ba -r 66411359ce4e lib-src/winclient.c --- a/lib-src/winclient.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lib-src/winclient.c Sat Oct 25 21:40:46 2008 +0900 @@ -40,6 +40,7 @@ /* -- Post-Include Defines -------------------------------------------------- */ /* Timeouts & delays */ +#define CONNECT_RETRIES 10 #define CONNECT_DELAY 500 /* ms */ #define TRANSACTION_TIMEOUT 5000 /* ms */ #define MAX_INPUT_IDLE_WAIT INFINITE /* ms */ @@ -206,7 +207,7 @@ CloseHandle (pi.hProcess); /* Try to connect */ - for (n = 0; n < 5; n++) + for (n = 0; n < CONNECT_RETRIES; n++) { Sleep (CONNECT_DELAY); diff -r 71bf2c5667ba -r 66411359ce4e lisp/ChangeLog --- a/lisp/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,1638 @@ +2008-08-31 Aidan Kehoe + + * window.el (only-window-p): New. + Check if WINDOW is the only window in some context, normally its + frame. + (one-window-p): + Implemented this in terms of #'only-window-p, calling it on the + selected window. + (window-buffer-height): Uncomment this, make it work. + (count-screen-lines): Support a BUFFER argument. + (fit-window-to-buffer): Uncomment this, correct its implementation + to work with XEmacs. + * help.el (temp-buffer-resize-mode): New. Name taken from GNU, + implementation our own. + * (resize-temp-buffer-window): New. GNU-compatible alias for + #'shrink-window-if-larger-than-buffer. + * dumped-lisp.el (preloaded-file-list): Move easy-mmode before + help, now that the latter uses #'define-minor-mode. + * frame.el: Point to #'temp-buffer-resize-mode in a comment. + Some of this code is from GNU; help.el CVS version 1.327 of + 2007-03-21, window.el CVS version 1.122, of 2007-06-24. Both these + are GPLV2 or later. + +2008-08-27 Aidan Kehoe + + * subr.el (skip-chars-quote): + Correct the implementation, following the docstring of + #'skip-char-forward more closely rather than the documentation of + character classes in the Lispref. + +2008-08-23 Aidan Kehoe + + * custom.el: Move #'custom-variable-p to C, since it's now called + from #'user-variable-p. + +2008-08-09 Aidan Kehoe + + * subr.el (skip-chars-quote): New. + Given STRING, return a string that means that all characters in + STRING will be skipped when passed to #'skip-chars-forward, + #'skip-chars-backward. + +2008-08-09 Aidan Kehoe + + * mule/cyril-util.el: Remove. Use the version in packages instead. + +2008-08-08 Aidan Kehoe + + * unicode.el: + * mule/mule-cmds.el: + * mule/latin.el: + * mule/cyrillic.el: + Rework the various identifiers using error-sequence to use + invalid-sequence instead. + +2008-08-05 Aidan Kehoe + + * specifier.el (current-display-table): Initialise this here, not + in x-init.el, since we want it even on non-X builds to use the + support for displaying Unicode error sequences according to the + current locale. + * mule/mule-cmds.el (set-language-info): + Document error-sequence-coding-system, used to describe how to + display characters that are not valid Unicode on disk. + * mule/mule-cmds.el (finish-set-language-environment): + Implement error-sequence-coding-system. + * unicode.el (unicode-error-sequence-warning-face): + New face, to make it possible to distinguish invalid Unicode + sequences from the characters given by the valid Unicode + sequences. + * mule/cyrillic.el ("Russian"): + ("Ukrainian"): + ("Bulgarian"): + ("Belarusian"): + ("Cyrillic-ALT"): Add support for error-sequence-coding-system for + all these languages. + * mule/latin.el: + Add support for error-sequence-coding-system for the + Latin-alphabet language environments. + +2008-08-05 Aidan Kehoe + + * mule/iso-with-esc.el (greek-iso-8bit-with-esc): + (arabic-iso-8bit-with-esc): + Add these two here. Move the implementation of the + 'arabic-iso8859-6 character set here, with commentary on why that + is reasonable. + * mule/arabic.el (iso-8859-6): + Add iso-8859-6, windows-1256 implementations using + make-8-bit-coding-system. Remove our non-standard Mule character + sets. + * unicode.el (load-unicode-tables): Remove Arabic since it's no + longer dumped. + * mule/mule-msw-init-late.el: Remove Arabic. + * mule/mule-category.el (predefined-category-list): Remove + Arabic. + +2008-07-26 Aidan Kehoe + + * x-init.el (x-initialize-compose): + Rewrite to use #'loop, as does similar code in x-win-sun.el, + x-win-xfree86.el. Locally bind function-key-map to the correct + value for the device's console. + * x-win-xfree86.el (x-win-init-xfree86): + Locally bind function-key-map to the correct value for the + device's console. + * x-win-sun.el (x-win-init-sun): + Locally bind function-key-map to the correct value for the + device's console. + +2008-07-20 Aidan Kehoe + + * descr-text.el (describe-char-unicode-data): + Correct three calls to #'error; it doesn't take #'message style + format strings and arguments. + +2008-07-19 Aidan Kehoe + + * descr-text.el (describe-property-list): Move the (require + 'hyper-apropos) call to top level, this isn't the only function + that uses the relevant face. + (describe-char): Wrap the Unihan field descriptions if they are + longer than the windows width minus 50. + Rename the created buffer to reflect the character's position as + well as its value. + +2008-07-07 Aidan Kehoe + + Patch to make it up to the device-specific code whether + various Lisp functions should be called during device creation, + not relying on the startup code to decide this. Also, rename + initial-window-system to initial-device-type (which makes more + sense in this scheme), always set it. + + * startup.el (command-line): + Use initial-device-type, not initial-window-system; just call + #'make-device, leave the special behaviour to be done the first + time a console type is initialised to be decided on by the + respective console code. + + * x-init.el (x-app-defaults-directory): Declare that it should be + bound. + (x-define-dead-key): Have the macro take a DEVICE argument. + (x-initialize-compose): Have the function take a DEVICE argument, + and use it when checking if various keysyms are available on the + keyboard. + (x-initialize-keyboard): Have the function take a DEVICE argument, + allowing device-specific keyboard initialisation. + (make-device-early-x-entry-point-called-p): New. + (make-device-late-x-entry-point-called-p): New. Rename + pre-x-win-initted, x-win-initted. + (make-device-early-x-entry-point): Rename init-pre-x-win, take the + call to make-x-device out (it should be called from the + device-creation code, not vice-versa). + (make-device-late-x-entry-point): Rename init-post-x-win, have it + take a DEVICE argument, use that DEVICE argument when working out + what device-specific things need doing. Don't use + create-console-hook in core code. + * x-win-xfree86.el (x-win-init-xfree86): Take a DEVICE argument; + use it. + * x-win-sun.el (x-win-init-sun): Take a DEVICE argument; use it. + * mule/mule-x-init.el: Remove #'init-mule-x-win, an empty + function. + + * tty-init.el (make-device-early-tty-entry-point-called-p): New. + Rename pre-tty-win-initted. + (make-device-early-tty-entry-point): New. + Rename init-pre-tty-win. + (make-frame-after-init-entry-point): New. + Rename init-post-tty-win to better reflect when it's called. + + * gtk-init.el (gtk-early-lisp-options-file): New. + Move this path to a documented variable. + (gtk-command-switch-alist): Wrap the docstring to fewer than 79 + columns. + (make-device-early-gtk-entry-point-called-p): New. + (make-device-late-gtk-entry-point-called-p): New. + Renamed gtk-pre-win-initted, gtk-post-win-initted to these. + (make-device-early-gtk-entry-point): New. + (make-device-late-gtk-entry-point): New. + Renamed init-pre-gtk-win, init-post-gtk-win to these. + Have make-device-late-gtk-entry-point take a device argument, and use + it; have make-device-early-gtk-entry-point load the GTK-specific + startup code, instead of doing that in C. + (init-gtk-win): Deleted, functionality moved to the GTK device + creation code. + (gtk-define-dead-key): Have it take a DEVICE argument; use this + argument. + (gtk-initialize-compose): Ditto. + + * coding.el (set-terminal-coding-system): + Correct the docstring; the function isn't broken. + +2008-06-29 Aidan Kehoe + + * descr-text.el (describe-char-unicode-data): + Don't leak the Unihan database handle when looking up non-Han + characters. + +2008-06-04 Aidan Kehoe + + * descr-text.el (describe-property-list): + #'require hyper-apropos, since we use hyper-apropos-face + +2008-05-25 Aidan Kehoe + + * descr-text.el: New. + Taken from GNU's GPLV2 version of 2007-02-14, with modifications + for XEmacs support and extensions for Unihan.txt support and + db/dbm caches. + * simple.el (what-cursor-position): + Support an optional prefix argument, as does GNU, calling + #'describe-char to giving more detail on the character at point, + notably from UnicodeData and (in our case, optionally) Unihan.txt. + * syntax.el (syntax-after): + Make this available for the sake of #'describe-char. + * mule/mule-cmds.el (iso-2022-control-alist): + Make this available, for the sake of #'encoded-string-description + and #'describe-char. + * mule/mule-cmds.el (encoded-string-description): + Make this available, for the sake of #'describe-char. + * unicode.el (unicode-error-default-translation-table): + Make this a char table of type generic, not of type char. Makes it + possible to have the relevant logic in #'describe-char reasonably + clear; also, and this is undocumented, makes it much easier to + implement #'frob-unicode-errors-region. I should document this, + and revise #'frob-unicode-errors-region. + +2008-05-14 Stephen J. Turnbull + + * subr.el (add-to-list): Fix Aidan's last commit. + +2008-05-14 Aidan Kehoe + + * subr.el (add-to-list): Implement the same logic with a more + concise syntax; thank you Stephen, in + http://mid.gmane.org/87ablomdwx.fsf@uwakimon.sk.tsukuba.ac.jp . + +2008-02-25 bpalmer + + * subr.el(add-to-list): add support for `compare-fn' to sync with + emacs. + +2008-05-14 Aidan Kehoe + + * mule/mule-coding.el (make-8-bit-choose-category):=20 + Control-1 characters extend from #x80 to #x9F (inclusive), + not from #x80 to #xBF. + +2008-05-13 Aidan Kehoe + + * printer.el (generic-print-region): + (generic-print-buffer): + Use #'valid-device-type-p instead of #'valid-specifier-tag-p to + check if the msprinter device is available, now that msprinter is + always available as a specifier tag. + +2008-05-11 Aidan Kehoe + + * disp-table.el (make-display-table): + Update the example code to make it more general, and more + compatible with GNU. Also, I previously said #xFF when I meant + ?\xFF; correct this. + * mule/cyril-util.el (standard-display-cyrillic-translit): + Make the selection of the default language more sensible; change + the API a little to make a sensible default Cyrillic language + available, checking current-language-environment. + +2007-07-21 Aidan Kehoe + + * mule/cyril-util.el: + * mule/cyril-util.el (cyrillic-encode-koi8-r-char): Removed. + * mule/cyril-util.el (cyrillic-encode-alternativnyj-char): + Removed. No-one uses these functions in google.com/codesearch, + GNU have a comment doubting their utility, and their + implementation is trivial. + * mule/cyril-util.el (cyrillic-language-alist): + Reformatted. + * mule/cyril-util.el (standard-display-table)): Removed. It wasn't + used anyway. + * mule/cyril-util.el (standard-display-cyrillic-translit): + Rewrite it to work with character tables as display tables, and + not to abort with an error. + +2007-07-21 Aidan Kehoe + + * disp-table.el: + * disp-table.el (make-display-table): Moved earlier in the file in + a weak attempt at making syncing with GNU easier. + * disp-table.el (frob-display-table): + Autoload it, accept TAG-SET, for editing specifiers. + * disp-table.el (describe-display-table): + Have it handle character sets. + * disp-table.el (standard-display-8bit-1): + * disp-table.el (standard-display-8bit): + * disp-table.el (standard-display-default-1): + * disp-table.el (standard-display-ascii): + * disp-table.el (standard-display-g1): + * disp-table.el (standard-display-graphic): + * disp-table.el (standard-display-underline): + * disp-table.el (standard-display-european): + Rework them all to use put-char-table, remove-char-table instead + of aset. Limit standard-display-g1, standard-display-graphic to + TTYs; have standard-display-underline work on X11 too. + + * font.el (font-caps-display-table): + Use put-char-table instead of aset when editing a display table. + * x-init.el: + * x-init.el (tab): + Create the initial display table as a char-table, not a vector. + +2008-01-20 Aidan Kehoe + + * startup.el (command-line-do-script): New. + (command-switch-alist): Use command-line-do-script. + New argument, compatible with GNU; --script or -script says "treat + the following argument as a file to load in batch mode". + +2008-05-07 Aidan Kehoe + + * mule/latin.el (windows-1250): Add the Central European Windows + coding system. + * mule/mule-win32-init.el: Don't use the Windows-specific CP1250 + implementation, rely on that in latin.el instead. + +2008-04-13 Henry S. Thompson , Mike Sperber + + * window-xemacs.el (save-window-excursion/mapping, + set-window-configuration/mapping): Add. These function return an + alist mapping the window objects from the original window + configuration to the window objects corresponding to them in the + restored configuration. + (set-window-configuration): + (saved-window): + (root-window->saved-window): + (really-set-window-configuration): + (restore-saved-window): Record the mapping for above functions. + +2008-04-12 Henry S. Thompson + + * window-xemacs.el (real-split-window, real-delete-window): Define + these to the original definitions of `split-window' and + `delete-window', and use them in the window-configuration code to + make sure it doesn't get affected by advice to these functions. + +2008-04-10 Aidan Kehoe + + * help.el (describe-function-1): + Rely on #'symbol-file to tell which file an autoloaded function + belongs to, don't special-case them. + +2008-03-19 Stephen J. Turnbull + + * custom.el (custom-theme-reset-internal): Fix call to get (symbol + and property were reversed). + +2008-03-12 Mike Sperber + + * window-xemacs.el (restore-saved-window): Restore window + parameters right after splitting, rather than after traversing the + other children. + +2008-03-07 Michael Sperber + + * gnuserv.el (gnuserv-temp-file-regexp): Quote the temp-directory + part. + +2008-03-05 Didier Verna + + Fix auto-formatting of comments in auto-fill-mode. + + * newcomment.el (comment-indent): Don't insert a space at bol. + * newcomment.el (comment-indent-new-line): Bind + block-comment-start to comment-start in order to preserve the + formatting of previous comment lines. + +2008-03-05 Didier Verna + + Ease customization of face(s) under point. + Suggested by Andreas Rohler. + + * cus-edit.el (custom-face-prompt): New (interactive call). Offer + a prefix for choosing a face amongst those at point instead of all + of them. + * cus-edit.el (customize-face-1): New. Factor out from the + functions below. + * cus-edit.el (customize-face): Use it. + * cus-edit.el (customize-face-other-window): Ditto. + +2008-02-16 Michael Sperber + + * autoload.el (autoload-make-autoload-operators, + autoload-make-autoload-complex-operators): Move autoload operator + definitons to autoload-operators.el in xemacs-base package. + Continue to work with older packages. + +2008-02-03 Aidan Kehoe + + * iso8859-1.el (ascii-case-table): + Correct the order of the arguments to #'put-case-table-pair. + +2008-01-25 Michael Sperber + + * build-report.el (build-report-version-file-regexp): Adjust to + handle Mercurial hash. + +2008-01-21 Aidan Kehoe + + * info.el (Info-suffix-list): + Support LZMA compression, as used--oddly--by Mandriva Linux. + +2008-01-17 Mike Sperber + + * files.el (insert-directory): Bind `coding-system-for-read' to + the `file-name' coding system. (Previously, the default ended up + being undecided, which doesn't work well for UTF-8-based locales, + for example.) + +2008-01-16 Aidan Kehoe + + * keydefs.el (global-map): + Bind '(shift delete) to #'kill-primary-selection, as described by + Glynn Clements in + 16434.49191.47038.991206@cerise.nosuchdomain.co.uk of 2004-02-08. + +2008-01-14 Jerry James + + * font-lock.el (font-lock-add-keywords): Adapt to differences in + Emacs and XEmacs compiled font-lock lists. + * font-lock.el (font-lock-remove-keywords): Ditto. + * font-lock.el (font-lock-set-defaults-1): Make changes specified + by font-lock-keywords-alist and font-lock-removed-keywords-alist. + +2008-01-14 Aidan Kehoe + + * bytecomp.el (byte-compile-output-file-form): + Bind print-gensym-alist to nil, as we do within + byte-compile-output-docform. + +2008-01-04 Michael Sperber + + * code-files.el (insert-file-contents): + (load): Don't call `substitute-in-file-name' on the file name. + +2008-01-03 Aidan Kehoe + + * cus-edit.el (custom-save-all): + If the directory containing the custom file doesn't exist, try to + create it. Fixes Nick's Crabtree's bug of + 5fb265820712140145w512fa3bbh355cf76f7e2cf792@mail.gmail.com ; + thank you Nick. + * menubar-items.el (default-menubar): + In the code to edit the user's init file, try to create the + containing directory if it doesn't exist. + +2008-01-02 Aidan Kehoe + + * gtk-init.el (init-post-gtk-win): + Trust the X11 code to give us decent default fonts. + +2008-01-02 Aidan Kehoe + + * x-iso8859-1.el: Removed. + * gtk-iso8859-1.el: Removed. + These haven't been used in a year and a half. No need to keep them + around. + +2008-01-02 Mike Sperber + + * minibuf.el (mouse-read-file-name-1): Use `window-height' instead + of `frame-height' to be consistent with `split-window''s + calculations. Bind `window-min-height' for the whole thing to + avoid geometry problems with the buttons window. + +2008-01-02 Mike Sperber + + * minibuf.el (mouse-read-file-name-1): Make the buttons in the + dialog frame occupy `window-min-height' lines to avoid problems + when the window configuration changes---as it does with + `resize-minibuffer-mode'. + +2007-12-31 Aidan Kehoe + + * menubar-items.el (default-menubar): + Byte compile the specified lambdas. Correct some compile time + warnings uncovered by this. + * menubar-items.el (tutorials-menu-filter): + If a language environment doesn't have an associated POSIX locale + specified--which indicates we don't want it used except by those + who know what they're doing--don't show its tutorial in the menu. + * behavior.el (behavior-menu-filter): + Byte compile the lambdas in the generated menu. + +2007-12-30 Aidan Kehoe + + * iso8859-1.el: (provide 'iso8859-1) again, because one file uses + it in the packages. + +2007-12-30 Aidan Kehoe + + * subr.el (with-case-table): New. + Idea and implementation taken from GNU's code of April 2007, + before GPL V3 was implied. Thank you GNU. + * iso8859-1.el (ascii-case-table): New. + Idea taken from GNU. + * iso8859-1.el : + Change Jamie's implicit compile-time call to a macro literal into + something comprehensible to and maintainable by mortals, using to + cl.el's #'loop. + * iso8859-1.el (ctl-arrow): + Initialise it to something more comprehensible. + +2007-12-30 Aidan Kehoe + + * loadhist.el (symbol-file): + Accept a new TYPE argument, compatible with GNU, saying + whether function or variable definitions should be searched for. + Implement the functionality for autoloads, handling TYPE + correctly. + Pass the TYPE argument to built-in-symbol-file correctly. + Document that TYPE is not implemented for non-autoloaded Lisp + definitions. Our load-history doesn't have the relevant metadata. + +2007-12-25 Aidan Kehoe + + * glyphs.el (init-glyphs): + Revert part of Didier's 2007-10-15 commit, which broke + #'make-image-specifier with string arguments, and more noticeably + truncation-glyph, continuation-glyph, octal-escape-glyph, + control-arrow-glyph. + +2007-12-23 Mike Sperber + + * font.el (xft-font-create-object): Use + `fc-pattern-get-or-compute-size' instead of + `fc-pattern-get-size'. + + * fontconfig.el (fc-pattern-get-or-compute-size): Add. + +2007-12-22 Stephen J. Turnbull + + Factor out lists of operators specially treated by `make-autoload'. + + * autoload.el (autoload-make-autoload-operators): New. + (autoload-make-autoload-complex-operators): New. + (make-autoload): Use them. + +2007-12-18 Mike Sperber + + * autoload.el (process-one-lisp-autoload): Insert into + the section header for immediate autoloads, to make sure the + upstream doesn't think there aren't any autoloads at all. + +2007-12-19 Mike Sperber + + * startup.el (ask-about-user-init-file-migration-p): Factored out + check. + (maybe-migrate-user-init-file): + (migrate-user-init-file): Don't do a backup of ~/.emacs anymore. + Instead, make only a manual adjustment of the file, if at all, + i.e. don't go through customize magic anymore. + (unmigrate-user-init-file): Don't use customize to set + `load-home-init-file' anymore. + (set-load-home-init-file): Add; performs the modification + previously done through customize. + (unmigrate-user-init-file): Use `set-load-home-init-file' instead + of customize. + (command-line-1): Only wait for the first event if we're not going + to ask about migration. + +2007-12-18 Aidan Kehoe + + * help.el (describe-function-1): + Give details of bindings for commands, taking into account + global-window-system-map and global-tty-map when bindings differ + compared to the global map. + +2007-12-17 Aidan Kehoe + + * subr.el (integer-to-bit-vector): New. + * subr.el (bit-vector-to-integer): New. + Provide naive implementations using the Lisp reader for these. + +2007-12-14 Aidan Kehoe + + * process.el (substitute-env-vars): + Merge an example from GNU's docstring. + * process.el (setenv): + Pass nil as the default abbrev table to the #'read-from-minibuffer + call, instead of passing the current value of the variable. Bug + introduced by an incorrect sync from GNU by Ben; reported by + Thomas Mittelstaedt in 47626712.40609@cadenas.de. + + Document the #'set-time-zone-rule call when TZ is set. Push the + old value on to the beginning of setenv-history. (Both merged from + GNU.) Document that we don't do the coding-system frobbing at this + level that GNU does. + + Provide a commented-out, sample implementation of GNU's + #'environment; document why I think we shouldn't include it. + +2007-12-11 Aidan Kehoe + + * mule/latin.el : + Specify tutorial-coding-system using dotted cons notation, since + it's not a list. Prevents an error in help-with-tutorial for these + languages. + +2007-12-09 Aidan Kehoe + + * abbrev.el (write-abbrev-file): + Write FILE using escape-quoted, as a coding system. Add a coding + cookie to specify exactly what coding system was used + (escape-quoted is aliased to binary on non-Mule). Thank you for + the bug report, Uwe Brauer. + + This bug would have been resolved ages ago if we had merged + Dave Love's 2002 changes from GNU. Nope, I didn't merge the whole + file when doing this. + +2007-12-09 Aidan Kehoe + + * unicode.el (load-unicode-mapping-tables): + Call #'set-default-unicode-precedence wrapped with + #'declare-fboundp, to avoid warnings on non-Mule builds. + + * unicode.el (ccl-encode-to-ucs-2): + * unicode.el (unicode-error-sequence-regexp-range): + * unicode.el (frob-unicode-errors-region): + * unicode.el (unicode-error-translate-region): + Unconditionally provide these functions and variables at top + level in the code, to make them available to make-docfile. For the + INITVALUE args to #'defvar, conditionalise on (featurep 'mule); + ditto for the code that tests the lookup tables and provides the + WGL4 characters as jit-ucs-charset-0 characters. + + Unintern the function and variable symbols if (featurep 'mule) is + not true, so their function definitions and so on get garbage + collected at dump time in non-Mule builds. + + * obsolete.el (add-menu-item): + * obsolete.el (add-menu): + * obsolete.el (add-menu): + * obsolete.el (package-get-download-menu): + Provide these functions at top level, in order to make them + available to make-docfile.c, which has trouble interpreting byte + code. Unintern their symbols if the menubar feature is not + available, which means they will be garbage collected on + non-menubar builds. + +2007-12-09 Aidan Kehoe + + * mule/latin.el: + Create clones of the English language environment with UTF-8 and + Windows-1252 as the associated coding system, for Joachim Schrod's + use case of f8q022$3o3$1@sea.gmane.org. + +2007-12-04 Aidan Kehoe + + * keydefs.el: + Bind mouse wheel movements by default, to a lambda that calls the + autoloaded #'mwheel-install and then #'mwheel-scroll with the + appropriate event. + +2007-12-07 Vin Shelton + + * about.el: Minor bio update to test hg repository. + +2007-12-05 Aidan Kehoe + + * code-files.el (write-region): + Use a more concise and probably less confusing docstring from + Stephen. See + 87ve84323s.fsf@uwakimon.sk.tsukuba.ac.jp. + + Not following his suggestion of keeping the CODING-SYSTEM name for + the last argument, given that that would make reworking the + body of the necessary, and that I introduced a short-lived bug the + last time I did that. + +2007-12-03 Aidan Kehoe + + * bytecomp.el (byte-compile-file-form-custom-declare-variable): + Instead of using a keyword argument that's incompatible with 21.4, + modify the byte compiled init code to change the variable's + standard-value property itself. + +2007-12-04 Aidan Kehoe + + * mule/iso-with-esc.el: + * mule/iso-with-esc.el ('iso-latin-1-with-esc): New. + Provide the variable-length rarely-used ISO 2022 compatible coding + systems for Latin (that is, iso-8859-[1-16]) again, to address + Stephen's veto. + +2007-12-04 Aidan Kehoe + + * autoload.el (make-autoload): + Support auto-autoloads for coding systems. + +2007-12-01 Aidan Kehoe + + * mule/mule-coding.el (iso-8859-1): + * mule/latin.el (iso-8859-2): + * mule/latin.el (iso-8859-3): + * mule/latin.el (iso-8859-4): + * mule/cyrillic.el (iso-8859-5): + * mule/greek.el (iso-8859-7): + * mule/hebrew.el (iso-8859-8): + * mule/latin.el (iso-8859-9): + * mule/latin.el (iso-8859-15): + * mule/latin.el (iso-8859-16): + Move the various ISO 8859 coding systems away from the ISO 2022 + implementation to a #'make-8-bit-coding-system implementation; + this has the handy side-effect of adressing most of the + unification problems the old implementation had. + + Add aliases for GNU compatibility. + + Still no warning on the imminent corruption of data, though. I'm + working on it. + * mule/greek.el (windows-1253): + Unconditionally provide this coding system. + +2007-12-01 Aidan Kehoe + + * bytecomp.el (byte-compile-output-file-form): + Bind print-gensym to a cons, to tell the Lisp printer not to clear + print-gensym-alist on exit from #'print. This is appropriate + because #'byte-compile-output-file-form may be called multiple + times for a given output file, and re-using the + #1=#:... placeholders in that context is inappropriate. + +2007-11-29 Aidan Kehoe + + * mule/mule-coding.el (make-8-bit-generate-helper): + Don't use 128 as a magic constant, instead make a let-binding to + in in the eval-when-compile clause, and pass that bound value + through to the run-time code. Fixes a bug where the compile-time + and run-time code didn't share this value. + * mule/mule-coding.el (make-8-bit-coding-system): + Mark the coding systems created by this code as such, for the sake + of automated testing of their round-trip compatibility. + +2007-11-28 Aidan Kehoe + + * simple.el: + * simple.el (xemacs-default-composefunc-dont-nag): New. + Variable to be bound when using the xemacs-default-composefunc + and when nagging should be avoided (notably when submitting bug + report). + +2007-11-28 Aidan Kehoe + + * mule/mule-cmds.el (create-variant-language-environment): + Set tutorial-coding-system to correspond to the original coding + system when creating the variant language environment. + +2007-11-27 Aidan Kehoe + + * bytecomp.el (byte-compile-file-form-custom-declare-variable): + Byte compile the default value for #'custom-declare-variable (and + thence defcustom) calls; pass the uncompiled value as the value of + a :default keyword, to be used in the customize UI if the byte + compiled init value differs from the non byte compiled init + value. + + GNU don't do these things. The advantages of doing it our way are + a) the byte compilation warnings and b) since our interpreter is + proportionately so much slower than theirs, we are penalised more + strongly when we interpret code, especially when + #'custom-declare-variable calls cluster, as they tend to do. + * cus-edit.el (customize-changed-options): + Wrap the #'interactive call to be less than 80 columns. + Wrap the code to less than 80 columns. + * cus-edit.el (custom-variable-menu): + * cus-edit.el (custom-face-menu): + * cus-edit.el (custom-group-menu): + Expose the lambda expressions in these variables to the byte + compiler. + * custom.el (custom-initialize-changed): + Correct the docstring; change the defun to defsubst, since calls + to this are only done from one function, and calls to that + function cluster. + * custom.el (custom-declare-variable): + Document the :default argument to #'custom-declare-variable; + implement it. + +2007-11-27 Aidan Kehoe + + * byte-optimize.el (byte-optimize-featurep): + Remove a useless let binding that was a hangover from an earlier + version of the code. Eliminates a byte-compile time warning. + +2007-11-22 Vin Shelton + + * about.el (about-hacker-contribution): Updated my bio. + +2007-11-15 Aidan Kehoe + + * code-files.el (write-region): + Call #'find-coding-system on the (possible) coding system argument + before checking it with #'coding-system-p; the latter function + gives false results when passed coding system names as symbols. + + Preserve the old order of determination of the coding system + better. + +2007-11-14 Aidan Kehoe + + * unicode.el (unicode-error-default-translation-table): + * unicode.el (unicode-error-sequence-regexp-range): + * unicode.el (frob-unicode-errors-region): + Make these variables and the single function available to + make-docfile, by moving them to the start of the line. This + conflicts with normal indentation of Lisp, unfortunately. + +2007-11-14 Aidan Kehoe + + * subr.el (string-to-sequence): + * subr.el (string-to-list): + * subr.el (string-to-vector): + (append STRING nil) is faster than (mapcar #'identity STRING), + (vconcat STRING) is faster than (mapcar #'identity STRING). Change + from GNU. + +2007-11-14 Aidan Kehoe + + * code-files.el (write-region): + Provide a new arg, CODING-SYSTEM-OR-MUSTBENEW, for compatibility + both with GNU (where it has the MUSTBENEW meaning) and earlier + XEmacs code (where it has the CODING-SYSTEM meaning). + * files.el: + * files.el (normal-backup-enable-predicate): + * files.el (auto-save-file-name-transforms): + Correct the docstrings of #'normal-backup-enable-predicate, + #'auto-save-file-name-transforms. + * files.el (make-temp-file): New. + Merge from GNU. + * subr.el: + Document that #'make-temp-name is now in files.el. + +2007-11-08 Aidan Kehoe + + * cus-edit.el (custom-save-all): + Merge Jason Spiro's fix of + c241693f0710021645g642f145n5925c7a35e7b2c58@mail.gmail.com , to + avoid corruption of the custom-set-variables and custom-set-fonts + calls in ~/.emacs if XEmacs doesn't understand any part of the + syntax of ~/.emacs . + +2007-10-31 Mike Sperber + + * autoload.el (make-autoload): Add `defclass' and `defmethod' as + defmacro-like operators. This is need to enable compilation of + packages that depend on eieio. + +2007-10-26 Aidan Kehoe + + * mule/general-late.el: + Now that all the dumped coding systems are available, decode + Installation-string using the value for + Installation-file-coding-system at dump time. + +2007-10-26 Aidan Kehoe + + * dumped-lisp.el (preloaded-file-list): + Allow version.el to be compiled. + * help.el (describe-installation): + Use and-boundp instead of (and (boundp ...); don't decode + Installation-string. Call #'error with a DATUM arg. + * loadup.el: + * loadup.el (Installation-string): Removed. + Moved to version.el. + * loadup.el (really-early-error-handler): + Move the initialization of Installation-string to version.el too. + * update-elc-2.el (update-elc-ignored-files): + * update-elc-2.el (batch-update-elc-2): + Remove version.el from the ignored files; if Mule is available, + always recompile it, since Installation-file-coding-system depends + on relatively complex Mule code. + * update-elc.el (unbytecompiled-lisp-files): + Remove version.el. + * version.el: + * version.el (Installation-file-coding-system): New. + Variable reflecting the native coding system at build time, to + better work out Installation-string. + * version.el (Installation-string): New. + Moved from loadup.el; documented in more detail. + +2007-10-26 Aidan Kehoe + + * mule/latin.el: + "pl" is the normal POSIX language code for Polish, not "po"; if a + tutorial is provided, set tutorial-coding-system explicitly based + on the language environment coding system, to override confusion + that can arise with the variant language environments. + +2007-10-01 Aidan Kehoe + + * byte-optimize.el: + * byte-optimize.el (byte-optimize-ever-present-features): New. + * byte-optimize.el (byte-optimize-featurep): New. + Optimise calls to (featurep 'xemacs) to t, since our byte code + refuses to run on GNU Emacs. Also optimises away checks for cl, + cl-extra, cl-19 and backquote, a conservative list of those + features that have been available in every XEmacs build since the + last time our opcodes changed. + +2007-10-14 Aidan Kehoe + + * coding.el: + Use raw-text, not no-conversion for iso-8859-1 on non-Mule; + preserves the line ending autodetection, but doesn't do coding + system autodetection. Thank you Stephen. + +2007-10-15 Didier Verna + + * glyphs.el (init-glyphs): Use more sensible image conversion + rules for tty consoles (don't inline images, explicitely recognize + more image types). Avoid images on stream consoles altogether. + +2007-10-13 Aidan Kehoe + + * cmdloop.el (yes-or-no-p): + Only call #'yes-or-no-p-dialog-box if it's bound. Eliminates a + compile-time warning; should not actually avoid any run-time + errors. + * coding.el: + * coding.el ('automatic-conversion): Removed. + On non-Mule builds, alias 'iso-8859-1 to 'no-conversion, not + 'undecided, since the latter does coding system autorecognition + that is useless and leads to stack overflows without Mule. Delete + 'iso-8859-2 as an alias on non-Mule + * faces.el (face-font-instance): + Only call get-charset if it's bound. + * faces.el (xpm-color-symbols): + Only modify xpm-color-symbols if it's bound. + * map-ynp.el (map-y-or-n-p): + Check that #'get-dialog-box-response is bound before calling it. + * menubar.el: + List #'menu-split-long-menu as an autoload, for those builds that + don't use it at runtime but nonetheless have to compile code that + uses it. + * minibuf.el (mouse-read-file-name-1): + Only use scrollbar-width if it's bound. + * obsolete.el: + Only provide #'add-meu-item, #'add-menu, + #'package-get-download-menu if the menubar feature is available at + runtime. + * obsolete.el (find-non-ascii-charset-string): + Only call #'charset-in-string if it's bound; else give nil. + * obsolete.el (find-non-ascii-charset-region): + Only call #'charset-in-region if it's bound; else give nil. + * select.el (activate-region-as-selection): + Only call #'mouse-track-rectangle-p if it's bound. + * select.el (select-make-extent-for-selection): + Ditto. + * simple.el (zmacs-make-extent-for-region): + Only call #'default-mouse-track-next-move-rect if it's bound. + * simple.el (zmacs-activate-region): + Use and-boundp rather than (and (boundp ...))) when checking for a + variable. + * unicode.el (featurep): + Don't bind res, which is not used, in the loop. + +2007-10-06 Stephen J. Turnbull + + * x-faces.el (x-color-list-internal): Should return a list of + strings. Make it so. + +2007-10-03 Aidan Kehoe + + * unicode.el (featurep): + Comment out the assertion until the issue in + 18179.49815.622843.336527@parhasard.net is fixed. This doesn't + remove any functionality, just a check. + +2007-10-02 Aidan Kehoe + + * code-files.el (insert-file-contents): + Document that START and END are zero-based, in contrast to buffer + offsets, and give an example of their use. + +2007-09-09 Aidan Kehoe + + * unicode.el (unicode-error-default-translation-table): + New. A char table mapping from Unicode error octets (as + represented in XEmacs) to ASCII, Control-1 and latin-iso8859-1. + + * unicode.el (unicode-error-sequence-regexp-range): + Correct it, add a build-time check that it matches every possible + error octet. + + * unicode.el (frob-unicode-errors-region) New. + Apply a supplied function to each set of error sequences in a + region. + * unicode.el (unicode-error-translate-region) New. + Translate the error octets in a region to the corresponding + ASCII, control-1 and latin-1 characters. + +2007-10-02 Didier Verna + + * objects.el (make-face-boolean-specifier): Fix docstring, really + make a face-boolean specifier (not a color one). + +2007-09-23 Stephen J. Turnbull + + * subr.el (replace-regexp-in-string): Handle SUBEXP arg properly. + +2007-09-30 Aidan Kehoe + + * x-faces.el: + * x-faces.el ('x-resource)): Removed. + Specifier tag moved to specifier.el to ensure availability on + non-X builds. + * specifier.el: + Provide x, tty, mswindows, msprinter, gtk and carbon as device + tags that never match on builds that don't support them. + * specifier.el ('x-resource)): New. + Moved here from x-faces.el + +2007-09-26 Adrian Aichner + + * package-get.el (package-get-download-sites): Introduce + ftp.cn.xemacs.org. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-09-25 Adrian Aichner + + * package-get.el (package-get-download-sites): Add new mirrors in + The Netherlands and China. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-09-20 Didier Verna + + Improvements in user options interactive prompting. This mainly + involves the following: before this patch, options of type 'group + or 'checklist were prompted by full sexp, without taking a + possible default value into account. Now, the user interaction + features individual prompting _with completion_ for each group or + checklist member. For group options, an optional default value is + also handled on an individual group member basis. + + * cus-edit.el (customize-set-value): Suppress the final ": " from + created prompts. + (customize-set-variable): Ditto. + (customize-save-variable): Ditto. + (custom-prompt-variable): Add final ": " to prompts if needed. + + * wid-edit.el (widget-prompt-spaceify): New. Add trailing space to + string if needed. + (widget-prompt): New. Construct a prompt for a widget. + (widget-prompt-value): Use it; make prompt argument optional. + (widget-default-prompt-value): Add final ": " to prompt. + (widget-field-prompt-internal): Ditto. + (widget-sexp-prompt-value): Ditto. + (widget-file-prompt-value): Ditto. + (widget-symbol-prompt-internal): Ditto. + (widget-choice-prompt-value): Ditto. + (widget-boolean-prompt-value): Ditto. + (widget-checklist-prompt-value): New. Prompt value with completion. + (checklist): Make the widget aware of it. + (widget-group-prompt-value): New. Prompt value with completion; + handle default value individually for each group member. + * wid-edit.el (group): Make the widget aware of it. + +2007-09-19 Didier Verna + + Update my personal info. + * about.el (xemacs-hackers): Use 'didier instead of 'dv. + * about.el (about-other-current-hackers): Ditto. + * about.el (about-url-alist): Add my musical website. + * about.el (about-personal-info): Update my entry. + * about.el (about-hacker-contribution): Ditto. + +2007-09-09 Norbert Koch + + * byte-optimize.el: Revert last patch from Steve Youngs. + +2007-09-02 Steve Youngs + + * byte-optimize.el (byte-optimize-featurep): New. Optimise + feature 'sxemacs to nil and 'xemacs to t. This is along the same + lines as GNU/Emacs where they optimise both 'xemacs and 'sxemacs + to nil. It has the added advantage of suppressing byte-compiler + warnings in most cases. + + * package-get.el (package-get-pgp-available-p): Removed. + (package-get-require-signed-base-updates): Ditto. + (package-entries-are-signed): Ditto. + (package-get-pgp-signed-begin-line): Ditto. + (package-get-pgp-signature-begin-line): Ditto. + (package-get-pgp-signature-end-line): Ditto. + (package-get-update-base-from-buffer): Remove the PGP nonsense. + +2007-08-29 Didier Verna + + * files.el (files-fetch-hook-value): Preserve locality of hooks by + working on copies. + +2007-08-29 Mike Sperber + + * setup-paths.el (paths-emacs-data-root-p): Use "share" instead of + "lib" as the subdirectory to look for when testing for a data + root. + +2007-08-25 Aidan Kehoe + + * mule/chinese.el ("Chinese-GB"): + * mule/chinese.el ("Chinese-BIG5"): + * mule/japanese.el ("Japanese"): + These three language environments have associated lambda + expressions to determine whether the current locale matches and + and what the native-coding-system should be. These used to be + stored uncompiled, since they were specified deep in the ALIST + argument to a #'set-language-info-alist call; this change moves + them into #'set-language-info calls where the byte-compiler can + compile them. Shouldn't make a huge difference, but startup time + is an issue for us. + + * mule/cyrillic.el (windows-1251): + Unconditionally provide windows-1251 using + make-8-bit-coding-system. + + * mule/latin.el: + Add a setup-function and an exit-function to the Turkish language + environment to change and restore the standard case table, + respectively. This reflects case conventions in Turkish, where + dotless i and dotted i are distinct characters with distinct case + forms. Add windows-1252, Mac Roman as coding systems. + + * mule/mule-cmds.el: + * mule/mule-cmds.el (set-language-environment): + * mule/mule-cmds.el (finish-set-language-environment): + Check setup-function and exit-function's validity with + #'functionp, not fboundp. It doesn't make a lot of sense to + exclude lambdas from being specified as setup-function and + exit-functions. Update a comment to reflect the that + posix-charset-to-coding-system-hash is no longer initialised at + compile time. + * mule/mule-coding.el: + * mule/mule-coding.el (define-translation-hash-table): + Call check-argument-type on the two arguments instead of an + explicit error in a conditional, for the sake of better style. + * mule/mule-coding.el (make-8-bit-choose-category): New. + Function that looks at a make-8-bit-coding-system decode table and + decides on an appropriate category for the associated coding + system. + * mule/mule-coding.el (make-8-bit-coding-system): + Use make-8-bit-choose-category to make the coding category for the + generated coding systems a bit more sane. + + * mule/mule-win32-init.el: + Move to a loop-with-destructuring-bind syntax for the creation of + Windows-specific coding systems. Specify the coding category of + the created coding systems, and create aliases of the form cpNNNN + for the compatibility with GNU. Use our own implementations + instead of the Windows ones for several coding systems, for the + sake of greater cross-platform compatibility. + +2007-08-25 Aidan Kehoe + + * unicode.el (load-unicode-tables): + Explicitly set the default unicode-precedence-list after loading + the unicode tables, to move the Western character sets before the + East Asian ones by default. + * unicode.el : + Avoid overflowing 80 characters per line with the CCL + program. Make unicode-error-sequence-zero and + unicode-error-sequence-regexp-range available to user code that + wants to work with Unicode error sequences. Decode those + characters in WGL4 that are not available in other Western + character sets at dump time into jit-ucs-charset-0, in the + interest of avoiding them getting East Asian fonts and width + information when decoding from Unicode. + +2007-08-20 Mike Sperber + + * window-xemacs.el (root-window->saved-window): + (restore-saved-window-parameters): Don't save the point of the + current buffer, as per the docstring. + +2007-08-21 Aidan Kehoe + + * mule/vietnamese.el ("Vietnamese"): Remove vscii and viqr from + the coding-system slot of the language environment for Vietnamese; + they're no longer available as coding systems in XEmacs, and they + were never widely used. + +2007-08-21 Adrian Aichner + + * package-get.el (package-get-download-sites): Update download + sites in Japan. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-08-16 Vin Shelton + + * font-lock.el: Add defvar for font-lock-warning-face. Original + patch from Hans de Graaff. + +2007-08-18 Adrian Aichner + + * package-get.el (package-get-download-sites): Update mirror sites. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-08-16 Adrian Aichner + + * package-get.el (package-get-download-sites): Mirror site update. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-08-09 Mike Sperber + + * startup.el (migrate-user-init-file): Create backup of + `user-init-file' before migrating. + * startup.el (maybe-migrate-user-init-file): Print + information about backup file. + (maybe-create-compatibility-dot-emacs): Follow above change. + +2007-08-07 Mike Sperber + + * setup-paths.el (paths-find-doc-directory): + (paths-find-exec-directory): + (paths-find-lisp-directory): + (paths-find-mule-lisp-directory): + (paths-construct-info-path): + (paths-find-data-directory): + * packages.el (packages-find-installation-package-directories): + * find-paths.el (paths-for-each-emacs-directory): + (paths-find-emacs-directories): + (paths-find-emacs-directory): + (paths-for-each-site-directory): + (paths-find-site-directory): + (paths-find-site-directories): + (paths-for-each-version-directory): + (paths-find-version-directories): + (paths-find-version-directory): Generalize to multiple bases. + (paths-find-architecture-directory): Use above to give roots + precedence over bases. This means, for example, that a directory + in an in-place root will always get precedence over an installed + root. + +2007-08-06 Aidan Kehoe + + * mule/mule-coding.el (make-8-bit-coding-system): + Eliminate byte compiler warnings for the generated coding systems. + * mule/mule-msw-init-late.el (l): + * mule/mule-x-init.el (x-use-halfwidth-roman-font): + Add a couple of declare-fboundp calls for functions we know will + be bound on a Windows build, to silence the byte compiler. + +2007-08-06 Aidan Kehoe + + * diagnose.el (show-memory-usage): + * diagnose.el (show-object-memory-usage-stats): + * diagnose.el (show-mc-alloc-memory-usage): + * diagnose.el (show-gc-stats): + Only call sort-numeric-fields when it's bound. It will be, for + anyone who has any business calling these functions; it's in + xemacs-base. + * font.el: + Tell the byte compiler about a few more functions that are + available and called on an XFT build, and unavailable and not + called elsewhere. + + * gtk-font-menu.el (gtk-reset-device-font-menus): + Improve the logic here; don't check for Mule, check whether + #'charset-registries is bound with an if-fboundp call. + + * gtk-iso8859-1.el (x-iso8859-1): + character-set-property is no longer used, on any platform. + * gtk.el (gtk-import-function-internal): + Tell the byte compiler about some functions that are available on + the GTK build and not elsewhere. + + * help.el (help-symbol-function-context-menu): + * help.el (help-symbol-variable-context-menu): + * help.el (help-symbol-function-and-variable-context-menu): + * help.el (help-find-source-or-scroll-up): + * help.el (help-mouse-find-source-or-track): + Only offer find-function, find-variable if they're available as + functions. + + * iso8859-1.el: + This file sets the case table for Latin 1, not the syntax table. + + * msw-font-menu.el: + * msw-font-menu.el (mswindows-parse-font-style): + Tell the byte compiler about a few functions that are available + and called on msw builds, and not elsewhere. + + * occur.el (occur-engine): + Use Ben's (if-fboundp ...) macro when calling (or otherwise) + #'jit-lock-mode. + + * paragraphs.el (forward-paragraph): + multiple-lines is set but not used; comment it out for the sake of + the byte-compiler. + + * paragraphs.el (forward-sentence): + Only call #'constrain-to-field if it's bound; give a more relevant + error message if it isn't. + * subr.el (check-argument-range): + Call signal-error with the correct signature. + * x-font-menu.el (charset-registries): + Make the byte compiler aware of a pile of functions that are + available on, and only called on, certain builds. + +2007-08-06 Aidan Kehoe + + * font.el (x-font-create-object): + When handed an XFT font name string, parse it as such. + * font.el (font-xft-font-regexp): + Don't check for the existence of xft-font-regexp; accept escaped + dashes, colons and commas in font family names. + +2007-08-04 Aidan Kehoe + + * unicode.el: + * unicode.el (utf-32): + * unicode.el (utf-32-little-endian): + Add UTF-32 coding systems. + + * unicode.el (decode-char): + Only accept valid Unicode in this function. + +2007-08-02 Mike Sperber + + * startup.el (startup-setup-paths): Fix typo in init expression + for `emacs-roots'. + +2007-07-31 Mike Sperber + + * find-paths.el (paths-for-each-site-directory): + (paths-find-site-directory): + (paths-find-site-directories): + (paths-for-each-version-directory): + (paths-find-version-directory): + (paths-find-version-directories): Add `arch-dependent-p' argument + to distinguish between `lib' and `share'. + (paths-find-architecture-directory): Follow above change. + * packages.el (packages-find-installation-package-directories): Ditto. + * setup-paths.el (paths-find-site-lisp-directory): + (paths-find-site-module-directory): + (paths-find-lisp-directory): + (paths-find-mule-lisp-directory): + (paths-find-module-directory): + (paths-find-data-directory): Ditto. + +2007-08-01 Aidan Kehoe + + * mule/cyrillic.el: + * mule/cyrillic.el ("Russian"): + * mule/cyrillic.el ("Ukrainian"): + * mule/cyrillic.el ("Bulgarian"): + * mule/cyrillic.el ("Belarusian"): + Add POSIX locale information for all four languages. Remove + information about specific coding systems in the docstrings, since + this information is inaccurate if a variant language environment + is being used. + + * mule/greek.el: + * mule/latin.el (for): + Add POSIX locale information, provide Windows-1253 as well. + + * mule/mule-coding.el (make-8-bit-generate-helper): + Fix a bug that was biting me with windows-1251. I need to include + tests in tests/automated/mule-tests.el that check that all the + coding-systems created with make-8-bit-coding-system are + reversible, since all of them should be. + +2007-07-28 Aidan Kehoe + + * mule/mule-coding.el (make-8-bit-create-decode-encode-tables): + Don't creat JIT mappings for U+0080-U+00FF at dump time. + +2007-07-28 Aidan Kehoe + + * unicode.el: + Assert that the ccl-encode-to-ucs-2 vector corresponds to the + compiled program at byte-compile time. Display non-BMP characters + as U+FFFD. + +2007-07-28 Adrian Aichner + + * package-get.el (package-get-download-sites): Document Chile and + update Denmark download site. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-07-27 Aidan Kehoe + + * mule/mule-ccl.el: + * mule/ccl.el: + Renamed mule-ccl.el to ccl.el, for compatibility with GNU now we + no longer dump it. + * mule/mule-coding.el (require): + * mule/chinese.el (progn): + Reflect this renaming in a couple of require calls. + +2007-07-23 Aidan Kehoe + + * mule/general-late.el (posix-charset-to-coding-system-hash): + Pick up coding system aliases as well as their canonical names + when initialising this hash. + * mule/mule-cmds.el (parse-posix-locale-string): + Interpret @cyrillic to mean that the coding system for a language + environment is Windows-1251. + +2007-07-21 Aidan Kehoe + + * mule/chinese.el: + * mule/cyrillic.el: + * mule/cyrillic.el (cyrillic-koi8-r-decode-table): Removed. + * mule/cyrillic.el (cyrillic-koi8-r-encode-table): Removed. + * mule/cyrillic.el (cyrillic-alternativnyj-decode-table): Removed. + * mule/cyrillic.el (cyrillic-alternativnyj-encode-table): Removed. + * mule/cyrillic.el (cyrillic-koi8-r-to-external-code-table): + Removed. + + * mule/cyrillic.el (ccl-decode-koi8): Removed. + * mule/cyrillic.el (ccl-encode-koi8): Removed. + * mule/cyrillic.el (ccl-decode-alternativnyj): Removed. + * mule/cyrillic.el (ccl-encode-alternativnyj): Removed. + * mule/cyrillic.el + (cyrillic-alternativnyj-to-external-code-table): Removed. + * mule/cyrillic.el ("Cyrillic-ISO"): Langenv added. + * mule/cyrillic.el ("Ukrainian"): Langenv added. + * mule/cyrillic.el ("Bulgarian"): Langenv added. + * mule/cyrillic.el ("Belarusian"): Langenv added. + + * mule/cyrillic.el (koi8-r): + * mule/cyrillic.el (koi8-ru): + * mule/cyrillic.el (koi8-t): + * mule/cyrillic.el (koi8-c): + * mule/english.el ("English"): + * mule/ethiopic.el (ccl-encode-ethio-font): + * mule/ethiopic.el (ethiopic): + * mule/japanese.el (for): + * mule/korean.el (for): + * mule/latin.el (iso-8859-15): + Use a normal quote; there's no need for a backquote. + * mule/mule-ccl.el: + * mule/mule-ccl.el (ccl-command-table): + * mule/mule-ccl.el (ccl-extended-code-table): + * mule/mule-ccl.el (ccl-embed-data): + * mule/mule-ccl.el (ccl-compile-lookup-integer): New. + * mule/mule-ccl.el (ccl-compile-lookup-character): New. + * mule/mule-ccl.el (ccl-dump-ex-cmd): + * mule/mule-ccl.el (ccl-dump-lookup-int-const-tbl): New. + * mule/mule-ccl.el (ccl-dump-lookup-char-const-tbl): New. + * mule/mule-ccl.el (define-ccl-program): + * mule/mule-ccl.el (ccl): + * mule/mule-ccl.el (ccl-execute-with-args): Removed. + * mule/mule-charset.el: + * mule/mule-charset.el ('charset-columns): Removed. + * mule/mule-charset.el ('charset-final): Removed. + * mule/mule-charset.el ('charset-graphic): Removed. + * mule/mule-charset.el ('charset-doc-string): Removed. + * mule/mule-coding.el: + * mule/mule-coding.el (define-translation-hash-table): New. + * mule/mule-coding.el (make-8-bit-private-use-start): New. + * mule/mule-coding.el (make-8-bit-generate-helper): New. + * mule/mule-coding.el (make-8-bit-generate-encode-program): New. + * mule/mule-coding.el (make-8-bit-create-decode-encode-tables): New. + * mule/mule-coding.el (make-8-bit-generate-decode-program): New. + * mule/mule-coding.el (make-8-bit-coding-system): New. + * mule/viet-util.el (viet-encode-viscii-char): + * mule/vietnamese.el: + * mule/vietnamese.el (?v): + * mule/vietnamese.el (viscii): + * mule/vietnamese.el (viet-viscii-decode-table): Removed. + * mule/vietnamese.el (viet-viscii-encode-table): Removed. + * mule/vietnamese.el (viet-vscii-decode-table): Removed. + * mule/vietnamese.el (viet-vscii-encode-table): Removed. + * mule/vietnamese.el (ccl-decode-viscii): Removed. + * mule/vietnamese.el (leading-code-private-11): Removed. + * mule/vietnamese.el (ccl-encode-viscii): Removed. + * mule/vietnamese.el (ccl-encode-viscii-font): Removed. + * mule/vietnamese.el (ccl-decode-vscii): Removed. + * mule/vietnamese.el (ccl-encode-vscii): Removed. + * mule/vietnamese.el (ccl-encode-vscii-font): Removed. + * mule/vietnamese.el (viet-viscii-to-external-code-table): + Removed. + + Provide make-8-bit-coding-system, a way to construct a fixed-width + XEmacs CCL coding system given a map from 8-bit characters to + Unicode. Such generated CCL coding systems do not have the Latin + deunification problem of iso-8859-15, for example. For most users, + most of the time, only a small minority of code conversions will + require a hash table lookup, so performance is good. + + Provide a compiler macro version of same, used when + make-8-bit-coding-system is called with literal arguments, since + at dump time the unicode conversion tables are not available, + whereas during compilation of dumped files they are. + + Rework cyrillic.el to use make-8-bit-coding-system. Add support + for previously trashed characters in KOI8-R, add support for + KOI8-u, re-add support for Windows-1251 when not building on + win32, add support for previously trashed characters in + Alternativnyj, add support for koi8-ru (unified Russian, + Belarusian and Ukrainian), add support for koi8-t (Tajik), koi8-c + \(languages of the Caucasus), koi8-o (archaic Russian, Old Church + Slavonic). Add language environments for Russian, Bulgarian, + Belarusian and Cyrillic-KOI8RU. + + Remove the ascii-right-to-left charset, which never worked. + + Move to syntactic integers in CCL, when semantic integers were + represented by character. + + Remove superflous calls to (modify-syntax-entry [...] "w"), since + character syntax now defaults to word. + + Add support for lookup-integer, lookup-character in mule-ccl.el, + based on Dave Love's work for GNU. + + Remove ccl-execute-with-args; ccl-execute-on-string ably does the + same job, and no-one's using it on google.com/codesearch. + + Correct the documentation for read-multibyte-character and + write-multibyte-character. + + Rework vietnamese.el to use make-8-bit-coding-system. Remove + the viqr coding system, since it never worked. Don't use a CCL + program to display VISCII; rely on our Unicode conversion + instead. + + Rework viet-encode-viscii-char, now + viet-viscii-to-external-code-table is no longer available. + +2007-07-21 Aidan Kehoe + + * dumped-lisp.el (preloaded-file-list): + It's not necessary to dump mule-ccl.el; the functionality from it + that's used in other dumped files is available in macro form. + * unicode.el (ccl-encode-to-ucs-2): + Update ccl-encode-to-ucs-2 to reflect the changes made to + mule-ccl.c. NB; this change needs to be made to + fsf-compat-unicode.el too. + +2007-07-16 Aidan Kehoe + + * isearch-mode.el (isearch-exit): + Don't highlight matches if we're currently executing a keyboard + macro. + +2007-07-16 Aidan Kehoe + + * x-init.el (x-initialize-keyboard): + Treat Cygwin and X.org as XFree86 on startup. + +2007-06-19 Ron Isaacson + + * frame.el (other-frame): Stop other-frame cycling through all frames. + +2007-06-19 Ron Isaacson + + * modeline.el (modeline-update-tty-frame-specifier): Don't use + non-existent function frame-tty-p. + +2007-06-23 Adrian Aichner + + * package-get.el (package-get-download-sites): Add and announce + web and ftp mirrors in Greece. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-06-22 Aidan Kehoe + + * files.el (revert-buffer): + * files.el (recover-file): + Pass NOMODIFY to set-buffer-file-coding-systems after reverting a + buffer and after recovering a file. + +2007-06-21 Aidan Kehoe + + * msw-faces.el: + Accept numbers, indeed anything other than a colon, as legitmate + in a font family as parsed by mswindows-font-regexp. Fixes the + problem reported in puftoj6l.fsf@isoware.de of six years ago. + +2007-06-21 Aidan Kehoe + + * mule/devan-util.el (devanagari-reorder-glyphs-for-composition): + * mule/ethio-util.el (ethio-fidel-to-sera-buffer): + '(lambda ...) -> #'(lambda ..), for the sake of style and the byte + compiler. + +2007-06-21 Aidan Kehoe + + * build-report.el (build-report-delete): + * cus-edit.el (custom-face): + * custom.el (custom-theme-reset-variables): + * fontconfig.el (fc-find-available-font-families): + * fontconfig.el (fc-find-available-weights-for-family): + * select.el (select-convert-from-integer): + * x-faces.el (x-find-smaller-font-xft): + * x-faces.el (x-find-larger-font-xft): + '(lambda ...) -> #'(lambda ..), for the sake of style and the byte + compiler. + +2007-06-12 Adrian Aichner + + * package-get.el (package-get-download-sites): Add mirror in Saudi + Arabia. + * package-get.el (package-get-pre-release-download-sites): Ditto. + +2007-05-29 Adrian Aichner + + * abbrev.el (expand-region-abbrevs): Downcase word before + abbreviation lookup, since `inverse-add-abbrev', `add-abbrev', + `define-mode-abbrev', and `define-global-abbrev' also downcase to + normalize abbreviations. + +2007-06-03 Aidan Kehoe + + * mule/mule-cmds.el: + * mule/mule-cmds.el (system-type-file-name-coding): New. + * mule/mule-cmds.el (set-language-environment-coding-systems): + Check system-type-file-name-coding for an entry before making the + file-name coding system alias equivalent to the native coding + system alias. + +2007-05-25 Mike Sperber + + * startup.el (startup-setup-paths): Print the configure-xxx + variables as well. + +2007-05-21 Aidan Kehoe + + * mule/latin.el: + The character set associated with the Turkish language environment + is latin-iso8859-9, not latin-iso8859-5. Who thought up the Latin + 5 vs. ISO 8859-9 distinction anyway? + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. @@ -15,14 +1650,14 @@ The other input methods require changes to mule-category.el that 21.4 doesn't have, and as such supporting them in the packages is mostly impossible. I've commented out the references to them in - the corresponding language environment. + the corresponding language environment. * mule/mule-category.el (define-category): Add an optional argument to define-category, taken from GNU; it's still only a partial implementation, though. This whole file is - chaos. + chaos. * mule/mule-category.el (make-category-table): New. - Trivial implementation, for GNU compatibility. + Trivial implementation, for GNU compatibility. 2007-05-20 Stephen J. Turnbull @@ -54,7 +1689,7 @@ Check for any Unicode escapes in the source file text when deciding whether Mule support is necessary for it, and whether to use escape-quoted as the .elc coding system. Thanks to Stephen for - the suggestion as to how to ignore appearances in comments. + the suggestion as to how to ignore appearances in comments. 2007-05-01 Stephen J. Turnbull @@ -87,9 +1722,9 @@ * specifier.el (device-type-matches-spec): Add `msprinter' to the type of devices that are not window - systems. + systems. * specifier.el (derive-device-type-from-tag-set): - Remove a superflous empty line. + Remove a superflous empty line. * specifier.el (derive-device-type-from-locale-and-tag-set): If CURRENT-DEVICE is provided, only ever return its type (if it matches TAG-SET) or nil (if it doesn't). @@ -97,10 +1732,10 @@ 2007-01-02 Aidan Kehoe * cus-face.el (custom-set-face-update-spec): - Fix some formatting. + Fix some formatting. * faces.el (reset-face): reset-face resets other faces to behave like the default face--it - shouldn't do anything if it's handed the default face. + shouldn't do anything if it's handed the default face. * font-menu.el: * font-menu.el (font-menu-set-font): If the font was initialised from X resources (the tag-set @@ -109,23 +1744,23 @@ * x-faces.el: Add a couple of fontconfig functions to the globally-declare-fboundp, to eliminate a couple of byte-compile - warnings. + warnings. * x-faces.el ('x-resource)): New specifier tag, used to mark when a face's font or other attributes have been initialised from X - resources. + resources. * x-faces.el (x-init-face-from-resources): Use the new specifier tag; also, instead of using a fragile explicit list of what would incidentally be specified for the X11 Unicode fonts in faces.c, pay attention to the new specifier tag created in that file for the specific purpose of grouping those - instantiators together. + instantiators together. 2007-04-22 Aidan Kehoe * x-font-menu.el (x-reset-device-font-menus-core): Only call charset-registries in the font menu if it's - available. Restores font menu functionality on non-Mule. - + available. Restores font menu functionality on non-Mule. + 2007-03-29 Stephen J. Turnbull * diagnose.el (show-object-memory-usage-stats): Fix docstring typo. @@ -157,10 +1792,10 @@ * mule/greek.el ("Greek"): Specify a native-coding-system for each of these language environments--since that is what is examined and relevant when - sniffing the locale at startup. + sniffing the locale at startup. * mule/mule-cmds.el (create-variant-language-environment): A language environment's coding-priority is a list of coding - systems, not coding categories. Treat it as such. + systems, not coding categories. Treat it as such. 2006-12-21 Aidan Kehoe @@ -168,18 +1803,18 @@ * mule/cyrillic.el (iso-8859-5): * mule/cyrillic.el (cyrillic-koi8-r-encode-table): Add syntax, case support for Cyrillic; make some parentheses more - Lispy. + Lispy. * mule/european.el: - Content moved to latin.el, file deleted. - + Content moved to latin.el, file deleted. + * mule/general-late.el: If Unicode tables are to be loaded at dump time, do it here, not - in loadup.el. - + in loadup.el. + * mule/greek.el: - Add syntax, case support for Greek. - + Add syntax, case support for Greek. + * mule/latin.el: Move the content of european.el here. Change the case table mappings to use hexadecimal codes, to make cross reference to the @@ -192,39 +1827,39 @@ often be inaccurate. Set the native-coding-system language info property while setting the other coding-system properties of the language. - + * mule/misc-lang.el (ipa): Remove the language environment. The International Phonetic _Alphabet_ is not a language, it's inane to have a corresponding - language environment in XEmacs. - + language environment in XEmacs. + * mule/mule-cmds.el (create-variant-language-environment): Also modify the coding-priority when creating a new language - environment; document that. + environment; document that. * mule/mule-cmds.el (get-language-environment-from-locale): Recognise that the 'native-coding-system language-info property - can be a list, interpret it correctly when it is one. + can be a list, interpret it correctly when it is one. 2006-12-21 Aidan Kehoe * coding.el (coding-system-category): Use the new 'unicode-type property for finding what sort of Unicode coding system subtype a coding system is, instead of the - overshadowed 'type property. + overshadowed 'type property. * dumped-lisp.el (preloaded-file-list): - mule/european.el has been removed. + mule/european.el has been removed. * loadup.el (really-early-error-handler): Unicode tables loaded at dump time are now in - mule/general-late.el. + mule/general-late.el. * simple.el (count-lines): Add some backslashes to parentheses in docstrings to help - fontification along. + fontification along. * simple.el (what-cursor-position): - Wrap a line to fit in 80 characters. + Wrap a line to fit in 80 characters. * unicode.el: Use the 'unicode-type property, not 'type, for setting the Unicode - coding-system subtype. + coding-system subtype. 2006-12-19 Stephen J. Turnbull @@ -247,13 +1882,13 @@ * mule/greek.el: Support case tables for greek-iso8859-7; make different choices on - the relevant syntax. + the relevant syntax. 2006-12-17 Aidan Kehoe * x-faces.el (x-init-face-from-resources): Only retain the fallbacks for the default face if we're not - running on XFT. + running on XFT. 2006-12-11 Aidan Kehoe @@ -269,7 +1904,7 @@ in Unicode, and its Mule charsets and codes, instead of simply its integer code point in this XEmacs. -2006-11-30 Mike Sperber +2006-11-30 Mike Sperber < * code-files.el (insert-file-contents): Call the file-name handler from Lisp, not from `insert-file-contents-internal', which is too late. @@ -286,22 +1921,22 @@ * mule/mule-charset.el (set-charset-registry): * mule/mule-charset.el (charset-registries): New. Make set-charset-registry, charset-registry obsolete; define a - setf for charset-registries. + setf for charset-registries. 2006-11-28 Aidan Kehoe * mule/cyrillic.el ("Cyrillic-KOI8"): * mule/cyrillic.el ("Cyrillic-ALT"): Add information on the native coding system of the machine to the - language environment definition for Cyrillic. + language environment definition for Cyrillic. * mule/general-late.el: New file, for dumped Mule code that needs to be run after the - language support has been loaded. + language support has been loaded. * mule/mule-cmds.el: * mule/mule-cmds.el (set-language-info-alist): - Return the new language environment name instead of nil. + Return the new language environment name instead of nil. * mule/mule-cmds.el (langenv-to-locale-hash): Removed. This was relevant because coding_system_of_xrm_database called @@ -311,31 +1946,31 @@ * mule/mule-cmds.el (posix-charset-to-coding-system-hash): New. A map from charsets as found in POSIX locales, with - non-alphanumeric character stripped, to XEmacs coding systems. + non-alphanumeric character stripped, to XEmacs coding systems. * mule/mule-cmds.el (parse-posix-locale-string): New. Parse a POSIX locale string into a language, region, charset, - modifiers quad. + modifiers quad. * mule/mule-cmds.el (create-variant-language-environment): New. Create a version of a language environment which differs in its name and in the associated coding systems from a given language - environment. + environment. * mule/mule-cmds.el (get-language-environment-from-locale): Rework to better pay attention to the POSIX locale, and to create language environments on the fly if the coding system of a given language differs from that available in the environment. * mule/mule-cmds.el (set-language-environment-coding-systems): - Update a comment. + Update a comment. 2006-11-28 Aidan Kehoe * dumped-lisp.el (preloaded-file-list): - Load mule/general-late when we're in a Mule build. + Load mule/general-late when we're in a Mule build. 2004-06-28 Nix * cmdloop.el (truncate-command-history-for-gc): Delay - execution of all things that look up variable bindings, - via `enqueue-eval-event'. + execution of all things that look up variable bindings, + via `enqueue-eval-event'. 2006-11-14 Stephen J. Turnbull @@ -357,65 +1992,65 @@ * unicode.el: Re-introduce ccl-encode-to-ucs-2; it's still being used by the - JIT-UCS charsets, despite what I thought. Thank you Ilya. + JIT-UCS charsets, despite what I thought. Thank you Ilya. 2006-11-05 Aidan Kehoe - - * mule/arabic.el (arabic-digit): - * mule/arabic.el (arabic-1-column): - * mule/arabic.el (arabic-2-column): - * mule/chinese.el (make-chinese-cns11643-charset): - * mule/chinese.el (chinese-sisheng): - * mule/english.el (ascii-right-to-left): - * mule/ethiopic.el (ethiopic): - * mule/european.el (latin-iso8859-14): - * mule/european.el (latin-iso8859-16): - * mule/indian.el (indian-is13194): - * mule/indian.el (indian-1-column): - * mule/indian.el (indian-2-column): - * mule/japanese.el (japanese-jisx0213-1): - * mule/japanese.el (japanese-jisx0213-2): - * mule/lao.el (lao): - * mule/misc-lang.el (ipa): - * mule/mule-charset.el: - * mule/thai-xtis.el (thai-xtis): - * mule/tibetan.el (tibetan-1-column): - * mule/tibetan.el (tibetan): - * mule/vietnamese.el (vietnamese-viscii-lower): - * mule/vietnamese.el (vietnamese-viscii-upper): - Stop using the `registry' charset property; use `registries' - instead. The difference is that registries is an ordered vector of - X11 registries and encodings rather than a regexp; this means we - can leave the matching to the X11 server, avoiding transferring - huge amounts of data (perhaps across the network!) in order to do - a regexp search on it. - * mule/mule-charset.el (charset-registries): New. - charset-registries returns the registries of a charset; + + * mule/arabic.el (arabic-digit): + * mule/arabic.el (arabic-1-column): + * mule/arabic.el (arabic-2-column): + * mule/chinese.el (make-chinese-cns11643-charset): + * mule/chinese.el (chinese-sisheng): + * mule/english.el (ascii-right-to-left): + * mule/ethiopic.el (ethiopic): + * mule/european.el (latin-iso8859-14): + * mule/european.el (latin-iso8859-16): + * mule/indian.el (indian-is13194): + * mule/indian.el (indian-1-column): + * mule/indian.el (indian-2-column): + * mule/japanese.el (japanese-jisx0213-1): + * mule/japanese.el (japanese-jisx0213-2): + * mule/lao.el (lao): + * mule/misc-lang.el (ipa): + * mule/mule-charset.el: + * mule/thai-xtis.el (thai-xtis): + * mule/tibetan.el (tibetan-1-column): + * mule/tibetan.el (tibetan): + * mule/vietnamese.el (vietnamese-viscii-lower): + * mule/vietnamese.el (vietnamese-viscii-upper): + Stop using the `registry' charset property; use `registries' + instead. The difference is that registries is an ordered vector of + X11 registries and encodings rather than a regexp; this means we + can leave the matching to the X11 server, avoiding transferring + huge amounts of data (perhaps across the network!) in order to do + a regexp search on it. + * mule/mule-charset.el (charset-registries): New. + charset-registries returns the registries of a charset; * mule/mule-charset.el (set-charset-registry): Moved here from C. 2006-11-05 Aidan Kehoe - * faces.el (face-property-matching-instance): - Simplify. - * faces.el (face-font-instance): - Document CHARSET. - * faces.el (set-face-font): - Give more details on common values for font instantiators, - LOCALEs. - * unicode.el: - Remove a few comments that were only relevant to GNU Emacs. - * unicode.el (decode-char): - * unicode.el (encode-char): + * faces.el (face-property-matching-instance): + Simplify. + * faces.el (face-font-instance): + Document CHARSET. + * faces.el (set-face-font): + Give more details on common values for font instantiators, + LOCALEs. + * unicode.el: + Remove a few comments that were only relevant to GNU Emacs. + * unicode.el (decode-char): + * unicode.el (encode-char): Document CODE, CHAR using uppercase, since they're parameters. Update commentary on GNU's mule-unicode charsets and - how we've solved the same problem. - * x-faces.el (x-init-face-from-resources): - Retain some of the fallbacks in the generated default face, since - it doesn't make sense to try Andale Mono's ISO-10646-1 encoding - for Amharic or Thai. - * x-font-menu.el (charset-registries): - * x-font-menu.el (x-reset-device-font-menus-core): - Use charset-registries instead of charset-registry. + how we've solved the same problem. + * x-faces.el (x-init-face-from-resources): + Retain some of the fallbacks in the generated default face, since + it doesn't make sense to try Andale Mono's ISO-10646-1 encoding + for Amharic or Thai. + * x-font-menu.el (charset-registries): + * x-font-menu.el (x-reset-device-font-menus-core): + Use charset-registries instead of charset-registry. 2006-11-02 Adrian Aichner @@ -451,12 +2086,12 @@ * files.el (revert-buffer-internal): When reverting, use the buffer-file-coding-system of the file's - buffer when determing whether something has changed on disk. - + buffer when determing whether something has changed on disk. + 2006-10-14 Jeff Miller - * info.el (Info-find-emacs-command-nodes): fix regex for find - command node. + * info.el (Info-find-emacs-command-nodes): fix regex for find + command node. 2006-08-10 Vin Shelton @@ -475,53 +2110,53 @@ * frame.el (suspend-or-iconify-emacs): * frame.el (suspend-emacs-or-iconify-frame): Elaborate on what the functions do, hopefully preventing - misunderstandings in the future. - + misunderstandings in the future. + * keydefs.el (global-tty-map): "\C-z" is suspend-or-iconify-emacs on the TTY, not suspend-emacs. Fixes problems that arose where pressing C-z in a - gnuclient frame suspended the whole process. - + gnuclient frame suspended the whole process. + 2006-08-05 Aidan Kehoe * lisp.el (forward-sexp): Handle raw strings specially just as we do structures. Fixes - problems evaluating them in *scratch*. + problems evaluating them in *scratch*. 2006-08-04 Aidan Kehoe * iso8859-1.el: Move the symbol table modification to three lines at the end of - syntax.c. + syntax.c. 2006-07-16 Aidan Kehoe * loadhist.el (symbol-file): Use `source-directory,' not `build-root' for the full pathnames of - C files. + C files. * loadup.el: * update-elc.el: Rename `build-root', `source-root' to `build-directory', `source-directory' respectively, the latter for compatibility with the FSF; give them and `source-lisp' docstrings, change the - defvars to defconsts where possible. + defvars to defconsts where possible. * make-docfile.el (build-root): Removed. * make-docfile.el (build-directory): New. - Rename build-root. - + Rename build-root. + * update-elc.el (build-root): Removed. * update-elc.el (build-directory): New. * update-elc.el (source-root): Removed. * update-elc.el (source-directory): New. - Rename build-root, source-root. + Rename build-root, source-root. 2006-07-13 Aidan Kehoe * unicode.el (decode-char): * unicode.el (encode-char): - Specify the SHOW-ARGS properly in a couple of assertions. - + Specify the SHOW-ARGS properly in a couple of assertions. + 2006-06-30 Jerry James * process.el (shell-command): If a specific output buffer was @@ -531,14 +2166,14 @@ * x-init.el (x-initialize-keyboard): No longer warn about Unicode keysyms without a mapping, since we - now have valid mappings for all Unicode keysyms. - + now have valid mappings for all Unicode keysyms. + 2006-06-25 Aidan Kehoe * cmdloop.el (read-quoted-char): Don't error on non-character keys, accept them as terminating the - sequence. - + sequence. + 2006-06-18 Aidan Kehoe * x-compose.el (compose-diaeresis-map): @@ -555,18 +2190,18 @@ * mule/mule-ccl.el (ccl-dump-unicode-to-mule): New. * mule/mule-ccl.el (define-ccl-program): Add two new CCL commands, and commands to describe them; document - them. + them. 2006-06-03 Aidan Kehoe * unicode.el: * unicode.el (featurep): Define a CCL program to translate characters to Unicode, for use - in redisplay with the fall-back Unicode charsets. + in redisplay with the fall-back Unicode charsets. * x-init.el (x-initialize-keyboard): Only warn about unknown Unicode keysyms if Mule is available; we assume that people who've chosen non-Mule are okay with losing - data. + data. 2006-06-03 Adrian Aichner @@ -597,27 +2232,27 @@ 2006-04-29 Aidan Kehoe * mule/ethio-util.el (ethio-fidel-to-java-buffer): - "\u" -> "\\u" as it should have been in the first place. - + "\u" -> "\\u" as it should have been in the first place. + 2006-04-29 Aidan Kehoe * dumped-lisp.el (preloaded-file-list): - Move loadhist earlier in the preloaded-file list. + Move loadhist earlier in the preloaded-file list. * help.el: * help.el (help-mode-map): Add bindings to find the source code of - a function, notably when that function's in C. + a function, notably when that function's in C. * help.el (describe-function-find-file, describe-symbol-find-file): - Removed. Use symbol-file from loadhist.el instead. + Removed. Use symbol-file from loadhist.el instead. * help.el (frob-help-extents): * help.el (describe-function-1): - Allow built-in function file names to be hyperlinks. + Allow built-in function file names to be hyperlinks. * help.el (describe-variable): * help.el (help-find-source-or-scroll-up): New. * help.el (help-mouse-find-source-or-track): New. - Make describe-function a bit more mouse-friendly, basically. + Make describe-function a bit more mouse-friendly, basically. * loadhist.el (symbol-file): - Support looking up builtin symbols using built-in-symbol-file. - + Support looking up builtin symbols using built-in-symbol-file. + 2006-04-23 Ville Skyttä * simple.el (goto-line): Add optional `buffer' argument, from @@ -648,7 +2283,7 @@ * cl.el (pushnew): Take on board Stephen's criticism of my last changes to the CL docstrings. - + 2006-04-24 Stephen J. Turnbull * dumped-lisp.el (fontconfig): Load only with Xft. @@ -677,7 +2312,7 @@ (x-make-font-unbold-xft): (x-make-font-italic-xft): (x-make-font-unitalic-xft): - (x-find-xft-font-of-size): + (x-find-xft-font-of-size): * x-font-menu.el (x-font-menu-load-font-xft): Use property-specific APIs instead of defconsts for property names. @@ -690,8 +2325,8 @@ * cl.el (pushnew): Docstring clarifications; drop non-standard formatting for incf, decf, pop, move to GNU's parameter names for push, pushnew since - they make it much easier to remember the right order. - + they make it much easier to remember the right order. + 2006-04-15 Aidan Kehoe * cmdloop.el (read-quoted-char): Use unicode-to-char instead of @@ -764,16 +2399,16 @@ 2006-02-05 Aidan Kehoe - * easymenu.el: Update copyright. + * easymenu.el: Update copyright. * easymenu.el (easy-menu-all-popups): - Add a docstring. + Add a docstring. * easymenu.el (easy-menu-add): Document a bug, rework the function to preserve any existing non-default mode-popup-menu instead of overwriting it, and not to bother normalising the menu title (nothing else does). * easymenu.el (easy-menu-remove): Restore the default mode-popup-menu instead of leaving an empty - one when we remove the last easy-menu popup. + one when we remove the last easy-menu popup. 2004-01-19 Martin Buchholz @@ -785,7 +2420,7 @@ * cmdloop.el (read-quoted-char): Eliminate some char/event confusion introduced by a GNU Emacs sync. - + 2006-01-06 Adrian Aichner * package-get.el (package-get-download-sites): Add pt.xemacs.org, @@ -813,7 +2448,7 @@ existing variables rather than groking the paths from scratch, and greatly simplify. - * packages.el (packages-find-all-package-hierarchies): + * packages.el (packages-find-all-package-hierarchies): Take into account `configure-early-package-hierarchies', `configure-late-package-hierarchies', `configure-last-package-hierarchies', as set by configure. @@ -822,27 +2457,27 @@ * mule/chinese.el: * mule/chinese.el ('euc-china): Removed. Shouldn't have been - uncommented in the first place. + uncommented in the first place. 2005-12-24 Aidan Kehoe * mule/mule-cmds.el (set-language-environment-coding-systems): * mule/mule-cmds.el (init-locale-at-early-startup): Call set-current-locale (the wrapper for setlocale(3)) before - checking the current locale, because the C code doesn't. - + checking the current locale, because the C code doesn't. + 2005-12-24 Aidan Kehoe * mule/chinese.el: Make euc-cn available as a coding system alias for cn-gb-2312, for - the sake of consistency with euc-jp, euc-ko and the FSF. - + the sake of consistency with euc-jp, euc-ko and the FSF. + 2005-12-24 Aidan Kehoe * x-win-sun.el (x-win-init-sun): * x-win-xfree86.el (x-win-init-xfree86): - Initialise the hardware-specific mapping from raw keycodes to the - US key layout. + Initialise the hardware-specific mapping from raw keycodes to the + US key layout. 2005-12-22 Stephen J. Turnbull @@ -858,12 +2493,12 @@ * mule/mule-cmds.el (set-language-environment-coding-systems): Initialise keyboard-coding-system, terminal-coding-system when applying a language environment, together with the input and - output coding systems for any active TTY console. + output coding systems for any active TTY console. * mule/mule-cmds.el (init-locale-at-early-startup): If set-current-locale returns a `more-specified version' of the current locale when passed a zero length argument, the magic used to work out the current language environment from the C locale - will fail. Call current-locale instead. + will fail. Call current-locale instead. 2005-12-17 Adrian Aichner @@ -952,12 +2587,12 @@ 2005-03-01 Aidan Kehoe - General cleanup of references to functions Eric has deleted - and renamed in the C core. - * font.el (x-font-create-object): + General cleanup of references to functions Eric has deleted + and renamed in the C core. + * font.el (x-font-create-object): xft-xlfd-font-name-p -> xlfd-font-name-p * font.el (x-font-create-object-xft): - xft-pattern-* -> fc-pattern-*, return the created font. + xft-pattern-* -> fc-pattern-*, return the created font. * font.el (x-font-create-name-xft): xft* -> fc* * fontconfig.el (fc-font-name-weight-regular): New. @@ -969,11 +2604,11 @@ Add information on the "regular" font weight, taken from fontconfig.h, which is the weight my local system returns by default. - + 2005-02-03 Eric Knauel - * fontconfig.el (fc-try-font): - (fc-find-available-font-families): + * fontconfig.el (fc-try-font): + (fc-find-available-font-families): (fc-find-available-weights-for-family): adapt to new representation of FcObjectSets @@ -1148,7 +2783,7 @@ * build-report.el: Note synch to XEmacs build package version 1.49. -2005-10-04 Stephen J. Turnbull +2005-10-04 Stephen J. Turnbull * build-report.el (build-report): Refactor into interactive portion and `build-report-create-report'. @@ -1184,7 +2819,7 @@ * simple.el (xemacs-default-composefunc): Don't warn when batch. -2005-10-04 Stephen J. Turnbull +2005-10-04 Stephen J. Turnbull * build-report.el: Synch to Adrian's packaged version. @@ -1226,9 +2861,9 @@ 2005-07-24 Fabrice Popineau - * window-xemacs.el (really-set-window-configuration): - * window-xemacs.el (current-window-configuration): - * window-xemacs.el (window-configuration-equal): + * window-xemacs.el (really-set-window-configuration): + * window-xemacs.el (current-window-configuration): + * window-xemacs.el (window-configuration-equal): * window-xemacs.el (window-configuration): Add `frame-top' and `frame-left' field to windows configurations, and save and restore them. @@ -1237,15 +2872,15 @@ * cmdloop.el (read-quoted-char): * isearch-mode.el (isearch-char-to-string): - Remove the fourth argument from event-to-character. - + Remove the fourth argument from event-to-character. + * dumped-lisp.el (preloaded-file-list): - No longer dump x-iso8859-1.el--we don't need it any more. + No longer dump x-iso8859-1.el--we don't need it any more. * x-init.el (x-initialize-keyboard): - * keymap.el (events-to-keys): + * keymap.el (events-to-keys): * events.el: - Rename the ascii-character keysym property to character-of-keysym. + Rename the ascii-character keysym property to character-of-keysym. * gtk-compose.el: Don't depend on gtk-iso8859-1.el @@ -1286,36 +2921,36 @@ * simple.el (xemacs-default-composefunc): New. * simple.el (xemacs-default-sendfunc): New. * simple.el ('xemacs-default-mail-user-agent): New. - Update the docstring for mail-user-agent to mention VM; default to - sendmail-user-agent, but on first use, give a huge warning that it - is underfeatured and not likely to get better in the medium term, - and the user should choose another mail client. - + Update the docstring for mail-user-agent to mention VM; default to + sendmail-user-agent, but on first use, give a huge warning that it + is underfeatured and not likely to get better in the medium term, + and the user should choose another mail client. + 2005-05-10 Aidan Kehoe * x-init.el (x-initialize-keyboard): Give info about any unbound - Unicode keysyms. + Unicode keysyms. 2005-05-10 Aidan Kehoe * mule/european.el: * mule/latin.el: Add full syntax table and case mapping information for - iso-8859-14, iso-8859-15, iso-8859-16. - + iso-8859-14, iso-8859-15, iso-8859-16. + 2005-05-05 Aidan Kehoe * mule/mule-ccl.el (define-ccl-program): Spelling and grammar fix - in docstring. + in docstring. 2005-05-05 Aidan Kehoe - * map-ynp.el: Grammar fix in comment. + * map-ynp.el: Grammar fix in comment. 2005-05-05 Aidan Kehoe * startup.el (command-line): Call font-lock-set-defaults to make - the user's choice of fontification take effect in *scratch*. + the user's choice of fontification take effect in *scratch*. 2005-04-12 Mike Sperber @@ -1336,7 +2971,7 @@ 2005-04-08 Aidan Kehoe * files.el (find-file): Honour the coding system argument even in - the case where we're creating a new file. + the case where we're creating a new file. 2005-04-04 Steve Youngs @@ -1352,68 +2987,68 @@ The warnings when there wasn't a bold or italic version of a given font available still specified "Emacs" as the X11 resource class. Change this to "XEmacs." - + 2005-03-29 Aidan Kehoe * startup.el (command-line): Move Mule initialisation before window-system initialisation, because the latter depends on - Unicode support with X11 and Unicode keysyms. + Unicode support with X11 and Unicode keysyms. 2005-03-28 Aidan Kehoe * register.el (insert-register): Revert part of Ben's incomplete - sync of 2005-01-26--we don't have insert-for-yank. - -2005-03-25 Ralf Angeli - - * easymenu.el (easy-menu-remove): As described in + sync of 2005-01-26--we don't have insert-for-yank. + +2005-03-25 Ralf Angeli + + * easymenu.el (easy-menu-remove): As described in E1D4Nn5-0001lq-EU@neutrino.iwi.uni-sb.de; don't strip everything - except the "Command" menu from mode-popup-menu. - -2005-03-25 Ralf Angeli - - * font.el (font-spatial-to-canonical): Correct calculation of - return value for pixel-based input value. - + except the "Command" menu from mode-popup-menu. + +2005-03-25 Ralf Angeli + + * font.el (font-spatial-to-canonical): Correct calculation of + return value for pixel-based input value. + 2005-03-17 Mike Sperber * files.el: Merge the following changes from GNU Emacs: 2005-01-04 Andreas Schwab - + * files.el (insert-directory): Only look for error lines in inserted text. Don't move too far after processing --dired markers. - + 2004-12-27 Richard M. Stallman - + * files.el (insert-directory-ls-version): New variable. (insert-directory): When ls returns an error, test the version number to decide what the return code means. With --dired output format, detect and distinguish lines that are really error messages. (insert-directory-adj-pos): New function. - + 2004-09-25 Stefan Monnier - + * files.el (insert-directory): Obey --dired even with symlinks. - + 2004-05-25 Luc Teirlinck - + (insert-directory): Check that lines were really inserted by the --dired switch, before erasing them. - + 2004-04-17 Richard M. Stallman - + * files.el (insert-directory): Delete any error msg output by the `insert-directory-program'. - -2005-03-12 Fabrice Popineau + +2005-03-12 Fabrice Popineau * select.el (get-selection): As described in u0nj9nvq.fsf@esemetz.metz.supelec.fr , get-selection-internal returns nil instead of signalling a selection-conversion error on win32. Also, Aidan had a logic error while traversing a - list. + list. 2005-03-11 Stephen J. Turnbull @@ -1444,38 +3079,38 @@ * select.el ('selected-text-type): New. Rename selected-text-type to selection-preferred-types, now that it's full of image types as fallbacks. Define an alias to the old - name. + name. * select.el (kill-primary-selection): deleted -> delete * select.el (get-selection-no-error): * select.el (get-selection): * select.el (get-selection-foreign): Reference selection-preferred-types instead of giving details of - which types these functions default to wanting. - + which types these functions default to wanting. + * select.el (select-make-extent-for-selection): Comment that we - need to hook something similar into the rectangle functions. + need to hook something similar into the rectangle functions. * select.el (select-convert-in): If we don't have a handler for an X11 selection, pass the value itself as a string. Fixes X11 atoms. - + * select.el (select-convert-to-timestamp): New. - Uses get-xemacs-selection-timestamp. + Uses get-xemacs-selection-timestamp. * select.el (select-convert-to-utf-8-text): New. * select.el (select-convert-from-text): Removed. The change in select-convert-in makes this irrelevant. - + * select.el (select-convert-from-length): Removed. - We have a more generic integer conversion routine here. + We have a more generic integer conversion routine here. * select.el (select-convert-from-filename): Removed. - The generic string conversion handles this. + The generic string conversion handles this. * select.el (select-convert-from-ip-address): New. - Whee. - + Whee. + * select.el (select-convert-from-utf-8-text): New. * select.el (select-convert-from-utf-16-le-text): New. The various Mozilla-specific types need the utf-16 conversion; @@ -1483,7 +3118,7 @@ * select.el (select-convert-from-image-data): New. Generic convert-an-image-to-a-space-with-end-glyph function. Used - by the next six functions. + by the next six functions. * select.el (select-convert-from-image/gif): New. * select.el (select-convert-from-image/jpeg): New. @@ -1493,22 +3128,22 @@ * select.el (select-convert-from-image/xbm): New. Check if we have support for a given image format; if so, pass back a space with the corresponding selection's image attached as - glyph data. + glyph data. * select.el (select-convert-from-cf-unicodetext): * select.el (select-convert-to-cf-text): * select.el (select-convert-to-cf-unicodetext): Check that the corresponding Windows coding systems are available - before trying to convert. - + before trying to convert. + * select.el (selection-converter-out-alist): * select.el (selection-converter-in-alist): - Update both lists to reflect the other changes in the file. - + Update both lists to reflect the other changes in the file. + * x-select.el (x-selected-text-type): Update the define-obsolete-variable-alias now selected-text-type - is called something else. - + is called something else. + 2005-02-25 Adrian Aichner * diagnose.el: Fix typo. @@ -1569,8 +3204,8 @@ * buffer.el (pop-to-buffer): * window-xemacs.el (display-buffer): Document use of `same-window-buffer-names,' `same-window-regexps' - by pop-to-buffer and display-buffer. - + by pop-to-buffer and display-buffer. + 2005-02-09 Ben Wing * dumped-lisp.el (preloaded-file-list): @@ -1601,9 +3236,9 @@ 2005-02-09 Aidan Kehoe - * unicode.el: - Add coding system aliases for utf-16-be and utf-16-le, for - improved compatibility with Mule-UCS and the FSF. + * unicode.el: + Add coding system aliases for utf-16-be and utf-16-le, for + improved compatibility with Mule-UCS and the FSF. 2005-02-07 Ben Wing @@ -1634,7 +3269,7 @@ * dumped-lisp.el (preloaded-file-list): Document that paragraphs needs easy-mmode. - + 2005-02-03 Ben Wing * packages.el (package-suppress): New. @@ -1682,7 +3317,7 @@ * easy-mmode.el, regexp-opt.el: Move these files into core. Uncomment stuff depending on new custom.el. - + * autoload.el: * autoload.el (generate-autoload-function): New. * autoload.el (autoload-feature-suffix): New. @@ -1718,7 +3353,7 @@ * update-elc-2.el (batch-update-elc-2): * update-elc.el (do-autoload-commands): Rewrite to use new autoload API. - + * update-elc.el (lisp-files-needing-early-byte-compilation): Add easy-mmode. @@ -1782,10 +3417,10 @@ * menubar-items.el (submenu-generate-accelerator-spec): Removed. * menubar.el (submenu-generate-accelerator-spec): New. Move to menubar.el and rewrite for cleanliness. - + * menubar-items.el (coding-system-menu-filter): Use menu-split-long-menu-and-sort. - + * menubar-items.el (menu-item-strip-accelerator-spec): Removed. * menubar-items.el (menu-item-generate-accelerator-spec): Removed. * menubar-items.el (menu-max-items): Removed. @@ -1801,17 +3436,17 @@ * menubar.el (menu-split-long-menu): New. * menubar.el (menu-sort-menu): New. Move to menubar.el. - + * menubar.el (menu-item-text): New. * menubar.el (menu-split-long-menu-and-sort): New. New funs. - + * menubar.el (find-menu-item): * menubar.el (find-menu-item-1): New. Split up find-menu-item w/find-menu-item-1, since PARENT is not an external item. Rewrite to use compare-menu-text. - + * menubar.el (add-menu-item-1): Don't normalize items as find-menu-item does not need it. @@ -1823,7 +3458,7 @@ is commented out, and the old Toold menu defn remains. Once the new packages are in place (c. 1 or 2 weeks), I'll make the switchover. - + Use menu-split-long-menu-and-sort. 2005-02-02 Ben Wing @@ -1832,7 +3467,7 @@ If a directory has no custom dependencies, write a blank custom-load file rather than deleting the file, so that time-based rebuild checking will work. - + * cus-edit.el: * cus-edit.el (custom-load-symbol): * cus-edit.el (custom-load-symbol-1): New. @@ -1843,10 +3478,10 @@ * cus-edit.el (custom-load-custom-defines-1): New. Split out code in custom-load-symbol. Support loading of the new custom-defines file. - + * cus-edit.el (custom-menu-create): Split long menus. - + * custom.el: * custom.el (load): * custom.el (custom-dont-initialize): New. @@ -1971,7 +3606,7 @@ * gtk-marshal.el (find-file): Propagate hash changes to gtk-marshal.el. - + 2005-01-26 Ben Wing * newcomment.el: @@ -2149,8 +3784,8 @@ * packages.el: Rewrote package-finding logic to separate the concepts of "package directories" and "package hierarchies". Added explanation of these concepts. - - * setup-paths.el: + + * setup-paths.el: * find-paths.el: Added parameter descriptions to some of the docstrings. @@ -2198,7 +3833,7 @@ * info.el (Info-additional-search-directory-list): Correct doc string giving example package path. - + * menubar-items.el (default-menubar): Move Prefix Rectangle command up one level. @@ -2236,7 +3871,7 @@ * mule/mule-ccl.el (MAP-ID): New. * mule/mule-ccl.el (INT-OR-CHAR): New. Update docs. - + 2004-10-26 Ben Wing * cl-extra.el (coerce): @@ -2249,12 +3884,12 @@ * frame.el (display-visual-class): * package-ui.el (pui-display-maintainer): Fix compile warnings. - + 2004-10-14 Ben Wing * dumped-lisp.el: Put in comment about extended chars in dumped files. - + * font-lock.el: * font-lock.el (lisp-font-lock-keywords-2): * font-lock.el (c-font-lock-keywords-2): New. @@ -2271,14 +3906,14 @@ to true on Windows systems. This will increase the size of the dumped XEmacs but allow XEmacs to be run when in a non-ASCII directory or with non-ASCII command-line arguments. - + * update-elc.el: * update-elc.el (unbytecompiled-lisp-files): * update-elc.el (additional-dump-dependencies): New. * update-elc.el ((preloaded-file-list site-load-packages files-to-process)): Add loadup.el, loadup-el.el and update-elc.el as additional dependencies, forcing a redump if they are changed. - + * win32-native.el: Add stuff snipped from Microsoft docs concerning how quoting conventions are supposed to work. @@ -2589,7 +4224,7 @@ * etags.el: * etags.el (tags-exuberant-ctags-optimization-p): Enable optimization - only for use with exuberant ctags. This will also enable building of + only for use with exuberant ctags. This will also enable building of completion tables with exuberant ctags. This will not work with xemacs ctags. New. * etags.el (get-tag-table-buffer): New function for creating of @@ -2602,7 +4237,7 @@ 2004-04-20 Malcolm Purvis - * gtk-marshal.el: Return type for INT is gint, not guint. + * gtk-marshal.el: Return type for INT is gint, not guint. 2004-02-23 Stephen J. Turnbull @@ -2662,11 +4297,11 @@ * frame.el: Synch with Emacs 21.3. 2004-02-23 Steve Youngs - + * package-get.el (package-get-update-base-from-buffer): Force - binary coding system for verifying GnuPG signature in the - package-index file. - + binary coding system for verifying GnuPG signature in the + package-index file. + 2004-02-06 Jerry James * term/linux.el: Change iso-latin-1 to iso-8859-1. @@ -2689,7 +4324,7 @@ (canonicalize-spec-list): (set-specifier): Improve docstring. - + 2004-01-21 Jerry James * wid-edit.el: Remove duplicate sexp widget definitions. @@ -2749,7 +4384,7 @@ 2003-10-11 Steve Youngs * package-ui.el (pui-display-keymap): Map `m' to - `pui-display-maintainer'. + `pui-display-maintainer'. (pui-help-echo): Display both the installed upstream version number and the available upstream version number. (pui-display-maintainer): New. @@ -2849,7 +4484,7 @@ 2003-08-28 Steve Youngs * package-ui.el (pui-set-local-package-get-directory): Remove - arg. + arg. 2003-07-31 René Kyllingstad @@ -2867,7 +4502,7 @@ 2003-07-31 Mike Sperber - * isearch-mode.el (isearch-mode-help): + * isearch-mode.el (isearch-mode-help): (isearch-update): (isearch-done): (isearch-edit-string): Change the way window configurations are @@ -2879,7 +4514,7 @@ 2003-07-24 Mike Sperber - * post-gc.el (simple-finalizer-ephemerons): + * post-gc.el (simple-finalizer-ephemerons): (add-finalizer): (cleanup-simple-finalizers): Implement simple object finalization. @@ -3034,11 +4669,11 @@ 2003-04-14 Steve Youngs * package-admin.el (package-admin-find-top-directory): Use - 'directory-sep-char'. + 'directory-sep-char'. (package-admin-get-install-dir): Ditto. This is so PUI won't break on platforms that don't use '/' as the - directory separator. - + directory separator. + * package-get.el (package-get-pgp-available-p): New. (package-get-require-signed-base-updates): Use it. (package-get-update-base-from-buffer): Move the code that finds @@ -3062,7 +4697,7 @@ DATUM arg to `error'. * package-ui.el (pui-toggle-package-key): Use the DATUM arg to - `error'. + `error'. (pui-toggle-package-delete-key): Ditto. (pui-install-selected-packages): Ditto. (pui-add-required-packages): Ditto. @@ -3074,7 +4709,7 @@ 2003-03-27 Stephen J. Turnbull * menubar-items.el (default-menubar): - * startup.el (in comment): + * startup.el (in comment): Global substitution: .Xresources for .Xdefaults. 2003-03-24 Jerry James @@ -3127,7 +4762,7 @@ Filter the package download sites menus through `menu-split-long-menu'. - + * obsolete.el (pui-add-install-directory): New. (package-get-download-menu): New. @@ -3138,7 +4773,7 @@ to. (package-admin-get-manifest-file): Whitespace clean up. (package-admin-check-manifest): Use `directory-sep-char' to - compute regexp. + compute regexp. Only search 'lisp' and 'man' directories to determine package name. @@ -3152,17 +4787,17 @@ * package-get.el: (package-get-remote): Change custom type so that only either a single directory or remote host:directory can be - selected. + selected. (package-get-download-sites): Put the sites into alphabetical - order of country. + order of country. Make the description element be "Country (site)" instead of the - other way around. + other way around. (package-get-pre-release-download-sites): New. (package-get-require-signed-base-updates): Default to t. (package-get-download-menu): Removed. (package-get-locate-file): Change to reflect new format of - 'package-get-remote'. + 'package-get-remote'. (package-get-update-base-from-buffer): Whitespace clean up and remove an unneccessary 'when'. (package-get-interactive-package-query): Whitespace clean up. @@ -3171,13 +4806,13 @@ (package-get-init-package): Ditto. (package-get-info): New. (package-get): Bring into line with new format of - 'package-get-remote'. - - Error if non-Mule XEmacsen try to install Mule packages. + 'package-get-remote'. + + Error if non-Mule XEmacsen try to install Mule packages. Don't rely on a Mule package having 'mule-base' in its "REQUIRES" to determine if it is a Mule package or not, - instead we test "CATEGORY". + instead we test "CATEGORY". Better handling of the situation where a partial package tarball exists on the local hard drive from a previous interupted @@ -3263,27 +4898,27 @@ * behavior.el (define-behavior): Allow other keywords for forward compatibility. - + * cl-macs.el (loop): Rewrite to eliminate byte-compiler warning when `return' is used without `finally'. - + * cmdloop.el (file-error): Avoid truncated error messages for `end-of-file' and the like. - + * cmdloop.el (read-quoted-char): Avoid char-int error after syncing. - + * files.el (find-file-noselect): * files.el (recover-file): * files.el (recover-session-finish): Eliminate byte-compile warnings. - + * printer.el (generate-header-line): Fix line-width calculations. #### This used to work. Someone's changes (perhaps by Michael Sperber?) seem to have messed something up. - + * simple.el (clear-message): * simple.el (append-message): * simple.el (raw-append-message): @@ -3497,7 +5132,7 @@ * dump-paths.el (startup-setup-paths): Removed. * dumped-lisp.el (preloaded-file-list): Delete. Combine stuff into setup-paths.el. - + * find-paths.el: * find-paths.el (paths-chase-symlink): * find-paths.el (paths-emacs-root-p): Removed. @@ -3507,7 +5142,7 @@ * find-paths.el (paths-find-emacs-roots): Removed. Make this file contain generic routines only. Move stuff to compute Emacs roots to setup-paths.el. - + * startup.el: * startup.el (emacs-roots): Removed. * startup.el (emacs-data-roots): Removed. @@ -3584,15 +5219,15 @@ * update-elc.el ((preloaded-file-list site-load-packages files-to-process)): Rewrite to allow for separated source and build trees, as may occur in MS Windows. - + NOTE TO BUILD HACKERS: - + loadup.el, make-docfile.el, update-elc.el and update-elc-2.el made two assumptions that are no longer correct: - + (1) The source and build trees are in the same place. (2) They can make assumptions about where `.' is. - + These files now compute the locations of the source and build roots at the top of the file. *ALL* constant file names or path snippets must now be made absolute using expand-file-name and one @@ -3606,12 +5241,12 @@ * packages.el (packages-unbytecompiled-lisp): Removed. Remove some unused lists of Lisp files. packages-hardcoded-lisp (empty, in any case) moved to dumped-lisp.el. - + * startup.el (find-init-file-1): New. * startup.el (find-user-home-directory-init-file): When a compiled init file is out-of-date wrt the uncompiled version, load the uncompiled version and issue a nasty warning. - + * update-elc-2.el (batch-update-elc-2): Force touching of auto-autoloads files when REBUILD_AUTOLOADS was set. @@ -3619,7 +5254,7 @@ * update-elc.el ((preloaded-file-list site-load-packages files-to-process)): Fix code that checks whether dumping is necessary to check against xemacs.dmp, not xemacs.exe, when Unix and pdump. - + 2003-02-20 Ben Wing * mule/mule-cmds.el: @@ -3634,7 +5269,7 @@ * code-cmds.el (coding-system-change-eol-conversion): Return a name not a coding system. - + * code-init.el: * code-init.el (coding-system-default-variable-list): * code-init.el (get-coding-system-variable): @@ -3642,7 +5277,7 @@ * code-init.el (coding-system-variable-default-value): Reindent. Remove `file-name' since it should always be the same as native. - + * unicode.el (load-unicode-tables): Rename to load-unicode-mapping-table as suggested by the anonymous (but rather Turnbullian) comment in unicode.c. @@ -3662,7 +5297,7 @@ file in a non-Mule XEmacs. Formerly you got the rather cryptic "The required feature `mule' cannot be provided". Now you get "Loading this file requires Mule support". - + * finder.el (finder-compile-keywords): Remove dependency on which directory this function is invoked from. @@ -3720,10 +5355,10 @@ this), and process recursively. Also frob .obj -> .c as mentioned earlier and handle other junk dependencies that need to be removed (NEEDTODUMP, make-docfile.exe). - + * update-elc-2.el (do-update-elc-2): Use :test `equal' in call to set-difference. - + * update-elc.el: Put back commented out kill-emacs, update header comment. @@ -3754,7 +5389,7 @@ Factor out common code in generate-{c-,}file-autoloads-1 into new function generate-autoload-ish-1. \(I was originally going to use this for custom as well but ended up thinking better of it.) - + * cus-dep.el: * cus-dep.el (cusload-hash-table-marker): New. * cus-dep.el (Custom-make-dependencies-1): @@ -3763,7 +5398,7 @@ seconds to do all files in lisp/*, lisp/*/* on my Pentium III 700). Use `message' not `princ' to get correct newline behavior. Output messages showing each file we do actually process. - + * update-elc-2.el: * update-elc-2.el (dirfiles-table): New. * update-elc-2.el (do-update-elc-2): @@ -3790,7 +5425,7 @@ directory-files ourselves, building a tree, and then looking in that tree, we could drastically shorten the time needed to do the locate operation.) - + 2003-02-12 Jerry James * about.el (about-url-alist): Add my home page. @@ -3818,15 +5453,15 @@ Separate obsolete and non-obsolete stuff and make sure we note when obsolete funs are just aliases for others. Also fix some problems with doc string hacking. - + * menubar-items.el: * menubar-items.el (default-menubar): Change the Help->Info submenu a bit. - + * text-props.el (text-property-any): * text-props.el (text-property-not-all): Fix bug when end > start. - + * update-elc.el (unbytecompiled-lisp-files): Add raw-process.el. @@ -3938,7 +5573,7 @@ * simple.el: * simple.el (motion-keys-for-shifted-motion): Omit M-S-home/end from motion keys. - + * update-elc.el (undumped-exe): New. * update-elc.el (dumped-exe): New. * update-elc.el (dumped-exe-out-of-date-wrt-dump-files): New. @@ -3957,17 +5592,17 @@ -- use standard methods for loading/not loading auto-autoloads.el (maybe fixes "Already loaded" error?) -- rename misleading NOBYTECOMPILE flag file. - + * window-xemacs.el (window-list): Fix bug in default param. - + * window-xemacs.el (really-set-window-configuration): * window-xemacs.el (restore-saved-window-parameters): Fix compile warnings. 2003-02-02 Steve Youngs - * about.el (xemacs-hackers): Add Jerry, Ville, + * about.el (xemacs-hackers): Add Jerry, Ville, (about-current-release-maintainers): Remove Martin, Jason. Add Jerry, Ville. (about-other-current-hackers): Add Martin, Jason. @@ -3981,10 +5616,10 @@ API improvement: - (autoload-target-directory): - (batch-update-autoloads): - (batch-update-directory): - (batch-update-one-directory): + (autoload-target-directory): + (batch-update-autoloads): + (batch-update-directory): + (batch-update-one-directory): (batch-force-update-one-directory): Deprecated. (autoload-feature-prefix): New special. @@ -4037,7 +5672,7 @@ 2003-01-10 Mike Sperber * window-xemacs.el: Revert his change - + 2003-01-10 Mike Sperber * window-xemacs.el (window-reduce-to-one): Rewrite in terms of @@ -4045,10 +5680,10 @@ (window-find-buffer-subwindow): Add. It caused subtle breakage. (And add a comment to that effect.) - + 2003-01-13 Mike Sperber - * packages.el: + * packages.el: * find-paths.el: Revert this change 2000-04-01 Mike Sperber @@ -4093,7 +5728,7 @@ * mule/japan-util.el (setup-japanese-environment-internal): usg-unix-v is not a suitable catchall. - * mule/viet-util.el: + * mule/viet-util.el: * mule/ethio-util.el: characater -> character. @@ -4133,7 +5768,7 @@ * The Great Window Configuration rewrite: Re-implement window configuration functionality in Emacs Lisp. - * window-xemacs.el (current-window-configuration): + * window-xemacs.el (current-window-configuration): (set-window-configuration): (plus many functions they depend on) Re-implement window configurations in Emacs Lisp. @@ -4910,7 +6545,7 @@ * mule/chinese.el: Likewise. 2002-06-03 Ben Wing and - Michael Sperber [Mr. Preprocessor] + Michael Sperber [Mr. Preprocessor] * process.el: * process.el (process-synchronize-point): New. @@ -5033,9 +6668,9 @@ (custom-save-variable-p): New function (custom-save-variable-internal): New function (custom-save-variables): Modified - (custom-save-face-p): New function - (custom-save-face-internal): Modified - (custom-save-faces): Modified + (custom-save-face-p): New function + (custom-save-face-internal): Modified + (custom-save-faces): Modified Save customized variables and faces in the alphabetic order. `custom-save-pretty-print' turns on/off pretty-printing values. @@ -5125,10 +6760,10 @@ 2002-04-23 Jerry James * select.el (get-clipboard): Document connection with - interprogram-paste-function. + interprogram-paste-function. * select.el (get-selection): Document that nil should be - returned if XEmacs owns the selection. - Remove unnecessary variable. + returned if XEmacs owns the selection. + Remove unnecessary variable. * simple.el (kill-ring-max): Synch with FSF Emacs 21.2. * simple.el (kill-new): Synch with FSF Emacs 21.2 @@ -5593,9 +7228,9 @@ 2002-03-16 IKEYAMA Tomonori - * unicode.el (load-unicode-tables): Make table for latin-jisx0201. - * mule/mule-msw-init.el: Character sets to codepage mapping - change. Add japanese-jisx0212, delete japanese-jisx0208-1978. + * unicode.el (load-unicode-tables): Make table for latin-jisx0201. + * mule/mule-msw-init.el: Character sets to codepage mapping + change. Add japanese-jisx0212, delete japanese-jisx0208-1978. 2002-03-15 Ben Wing @@ -5748,8 +7383,8 @@ 2002-03-05 Mats Lidell - * help-nomule.el (tutorial-supported-languages): Added Swedish - tutorial. Sorted languages. + * help-nomule.el (tutorial-supported-languages): Added Swedish + tutorial. Sorted languages. 2001-12-03 Christoph Wedler @@ -5979,8 +7614,8 @@ 2002-03-05 Mats Lidell - * help-nomule.el (tutorial-supported-languages): Added Swedish - tutorial. Sorted languages. + * help-nomule.el (tutorial-supported-languages): Added Swedish + tutorial. Sorted languages. 2002-02-11 Mike Sperber @@ -6130,7 +7765,7 @@ 2001-12-04 John Paul Wallington * paragraphs.el (mark-paragraph): synched with FSF; - added optional argument. + added optional argument. 2001-12-03 Didier Verna @@ -6915,13 +8550,13 @@ code in gpm-create/delete-device-hook) and eliminate warnings. ---------- make byte-recompile-directory work in the --------- - core `lisp' dir, even in the absence of + core `lisp' dir, even in the absence of a Mule XEmacs (i.e. make it skip the Mule - files rather than trying to compile them). - now you should be able to do `touch *.el' - in the `lisp' dir, then - M-x byte-recompile-directory, and get no - warnings. + files rather than trying to compile them). + now you should be able to do `touch *.el' + in the `lisp' dir, then + M-x byte-recompile-directory, and get no + warnings. * bytecomp.el: * bytecomp.el (byte-recompile-ignore-uncompilable-mule-files): New. @@ -7532,9 +9167,9 @@ 2001-01-25 Jason R. Mastaler - * about.el (xemacs-hackers): update my entry. - * about.el (about-maintainer-info): ditto. - * about.el (about-hackers): ditto. + * about.el (xemacs-hackers): update my entry. + * about.el (about-maintainer-info): ditto. + * about.el (about-hackers): ditto. 2001-02-20 Jan Vroonhof @@ -8766,245 +10401,245 @@ 2000-07-15 Ben Wing - * autoload.el: - Fixed comments. - - * cmdloop.el: - * cmdloop.el (yes-or-no-p): - * cmdloop.el (y-or-n-p): - Make these functions use should-use-dialog-box-p and not be - overridden in dialog.el. - - * cus-dep.el: - * cus-dep.el (Custom-make-dependencies): Removed. - * cus-dep.el (Custom-make-dependencies-1): New. - * cus-dep.el (Custom-make-one-dependency): New. - New entry point for use in Makefiles, to avoid excessive - invocations. - - * cus-edit.el (custom-variable-reset-saved): - * cus-edit.el (custom-variable-reset-standard): - * cus-edit.el (custom-save-resets): - Fix bytecompiler warnings. - - * dialog.el: - * dialog.el (yes-or-no-p-dialog-box): - * dialog.el (yes-or-no-p-maybe-dialog-box): Removed. - * dialog.el (y-or-n-p-maybe-dialog-box): Removed. - * dialog.el (get-dialog-box-response): - * dialog.el (message-or-box): - * dialog.el (make-dialog-box): - * dialog.el (popup-dialog-box): New. - Avoid yes-or-no-p bogosities. - Create a general function `make-dialog-box' to encapsulate all - dialog box methods; easily extendible. popup-dialog-box now obsolete. - - * dumped-lisp.el (preloaded-file-list): - Add dialog-items. Clean up. Group files by types. - - * easymenu.el (easy-menu-add): - * easymenu.el (easy-menu-remove): - Account for accelerators. - - * extents.el: - * extents.el (extent-list): New args, like in map-extents. - * extents.el (extent-at-event): New. - * extents.el (extents-at-event): New. - - * font-lock.el: - * font-lock.el (font-lock-mode): - * font-lock.el (font-lock-default-fontify-buffer): - * font-lock.el (font-lock-default-unfontify-region): - * font-lock.el (font-lock-fontify-syntactically-region): - * font-lock.el (font-lock-fontify-keywords-region): - Use new progress-feedback names. - - * font-lock.el (java-font-lock-identifier-regexp): - * font-lock.el (java-font-lock-class-name-regexp): - Fix bytecompiler warnings. - - * gutter-items.el: - * gutter-items.el (progress-display-use-echo-area): Removed. - * gutter-items.el (progress-feedback-use-echo-area): New. - * gutter-items.el (progress-display-popup-period): Removed. - * gutter-items.el (progress-feedback-popup-period): New. - * gutter-items.el (set-progress-display-style): Removed. - * gutter-items.el (set-progress-feedback-style): New. - * gutter-items.el (progress-display-style): Removed. - * gutter-items.el (progress-feedback-style): New. - * gutter-items.el (progress-stack): - * gutter-items.el (progress-displayed-p): Removed. - * gutter-items.el (progress-feedbacked-p): New. - * gutter-items.el (clear-progress-display): Removed. - * gutter-items.el (clear-progress-feedback): New. - * gutter-items.el (progress-display-clear-when-idle): Removed. - * gutter-items.el (progress-feedback-clear-when-idle): New. - * gutter-items.el (remove-progress-display): Removed. - * gutter-items.el (remove-progress-feedback): New. - * gutter-items.el (progress-display-dispatch-non-command-events): Removed. - * gutter-items.el (progress-feedback-dispatch-non-command-events): New. - * gutter-items.el (append-progress-display): Removed. - * gutter-items.el (append-progress-feedback): New. - * gutter-items.el (abort-progress-display): Removed. - * gutter-items.el (abort-progress-feedback): New. - * gutter-items.el (raw-append-progress-display): Removed. - * gutter-items.el (raw-append-progress-feedback): New. - * gutter-items.el (display-progress-display): Removed. - * gutter-items.el (display-progress-feedback): New. - * gutter-items.el (current-progress-display): Removed. - * gutter-items.el (current-progress-feedback): New. - * gutter-items.el (current-progress-display-label): Removed. - * gutter-items.el (current-progress-feedback-label): New. - * gutter-items.el (progress-display): Removed. - * gutter-items.el (progress-feedback): New. - Replace "progress-display" with "progress-feedback" globally. - - * gutter-items.el (lprogress-display): Removed. - * gutter-items.el (progress-feedback-with-label): New. - Rename lprogress-display ==> progress-feedback-with-label. - - * gutter-items.el (search-dialog-direction): Removed. - * gutter-items.el (search-dialog-text): Removed. - * gutter-items.el (search-dialog-callback): Removed. - * gutter-items.el (make-search-dialog): Removed. - Move to dialog-items.el. - - * help.el: - * help.el (help-mode-quit): - * help.el (mode-for-help): New. - * help.el (help-sticky-window): New. - * help.el (help-window-config): New. - * help.el (with-displaying-help-buffer): - * help.el (function-at-event): New. - * help.el (help-symbol-regexp): New. - * help.el (help-symbol-run-function-1): New. - * help.el (help-symbol-run-function): New. - * help.el (help-symbol-function-context-menu): New. - * help.el (help-symbol-variable-context-menu): New. - * help.el (help-symbol-function-and-variable-context-menu): New. - * help.el (frob-help-extents): New. - * help.el (describe-function-1): - * help.el (variable-at-point): - * help.el (variable-at-event): New. - * help.el (describe-variable): - Major overhaul. - - Make functions and variables be mousable. - - Middle button hyperlinks. - - New context-menu entries. - - * keydefs.el: - * keydefs.el (global-map): - New key bindings to move lines up and down. - - * lisp-mode.el: - * lisp-mode.el (construct-lisp-mode-menu): New. - * lisp-mode.el (emacs-lisp-mode-popup-menu): - * lisp-mode.el (lisp-interaction-mode-menubar-menu): - * lisp-mode.el (emacs-lisp-mode-menubar-menu): - * lisp-mode.el (lisp-indent-function): Indent "flet" entries better. - Make popup and menubar menus be different. Popup menu uses - clicked location and automatically assumes symbol under the mouse - for various commands. - - * menubar-items.el: - * menubar-items.el (bookmark-menu-filter): Add accelerators. - * menubar-items.el (buffers-menu-omit-chars-list): Include 'd'. - - * menubar-items.el (global-popup-menu): Removed. - * menubar-items.el (mode-popup-menu): Removed. - * menubar-items.el (activate-popup-menu-hook): Removed. - * menubar-items.el (popup-mode-menu): Removed. - * menubar-items.el (popup-buffer-menu): Removed. - * menubar-items.el (popup-menubar-menu): Removed. - Move to menubar.el. - - * menubar.el: - * menubar.el (global-popup-menu): New. - * menubar.el (mode-popup-menu): New. - * menubar.el (activate-popup-menu-hook): New. - * menubar.el (last-popup-menu-event): New. - * menubar.el (popup-mode-menu): New. - * menubar.el (popup-buffer-menu): New. - * menubar.el (popup-menubar-menu): New. - * menubar.el (menu-call-at-event): New. - Move non-content functions here. Add support for context menu - items on extents. - - * minibuf.el (minibuffer-history-uniquify): - Typo fix. - - * minibuf.el (read-file-name-1): - Call new file dialog box if it exists. - - * minibuf.el (mouse-rfn-setup-vars): - Clean up "chop" action. - - * mouse.el: - * mouse.el (button2): Now bound to mouse-track. - * mouse.el (click-inside-extent-p): - * mouse.el (point-inside-extent-p): - * mouse.el (point-inside-selection-p): - * mouse.el (mouse-drag-or-yank): Removed. - * mouse.el (mouse-begin-drag-n-drop): New. - * mouse.el (mouse-eval-sexp): - * mouse.el (mouse-track-activate-strokes): New. - * mouse.el (mouse-track-do-activate): New. - * mouse.el (mouse-track): - * mouse.el (default-mouse-track-event-is-with-button): New. - * mouse.el (default-mouse-track-cleanup-hook): - * mouse.el (default-mouse-track-drag-hook): - * mouse.el (default-mouse-track-drag-up-hook): - * mouse.el (default-mouse-track-click-hook): - Merge drag-n-drop into mouse-track. - Add general "activate" support to replace specific button2 kludges. - Use "button modifier" support in mouse-track. - - * package-get.el (package-get-dependencies): Fix bytecompiler warnings. - - * package-ui.el: - * package-ui.el (pui-menu): - * package-ui.el (pui-popup-context-sensitive): Removed. - Fix bytecompiler warnings. - Clean up popup code a bit. - - * select.el (get-selection-no-error): Fix bytecompiler warnings. - - * simple.el: - * simple.el (transpose-lines): - * simple.el (transpose-line-up): New. - * simple.el (transpose-line-down): New. - * simple.el (transpose-subr): - * simple.el (transpose-subr-1): Removed. - Clean up, add functions to move lines up and down. - - * startup.el (mail-host-address): - * startup.el (user-mail-address): - Customize. - - * subr.el: - * subr.el (set-symbol-value-in-buffer): New. - * subr.el (error): - * subr.el (check-argument-type): - * subr.el (defined-error-p): New. - Add structured error support. - - * toolbar-items.el (toolbar-compile): - Use new make-dialog-box. - - * update-elc.el: - - * userlock.el (ask-user-about-lock-dbox): - * userlock.el (ask-user-about-supersession-threat-dbox): - * userlock.el (ask-user-about-lock): - * userlock.el (ask-user-about-supersession-threat): - Use new make-dialog-box. - Add safety checks; use should use-dialog-box-p. - - * window-xemacs.el: - * window-xemacs.el (__buffer-dedicated-frame): - * window-xemacs.el (buffer-dedicated-frame): New. - * window-xemacs.el (set-buffer-dedicated-frame): New. - Move dedicated-frame stuff into lisp. + * autoload.el: + Fixed comments. + + * cmdloop.el: + * cmdloop.el (yes-or-no-p): + * cmdloop.el (y-or-n-p): + Make these functions use should-use-dialog-box-p and not be + overridden in dialog.el. + + * cus-dep.el: + * cus-dep.el (Custom-make-dependencies): Removed. + * cus-dep.el (Custom-make-dependencies-1): New. + * cus-dep.el (Custom-make-one-dependency): New. + New entry point for use in Makefiles, to avoid excessive + invocations. + + * cus-edit.el (custom-variable-reset-saved): + * cus-edit.el (custom-variable-reset-standard): + * cus-edit.el (custom-save-resets): + Fix bytecompiler warnings. + + * dialog.el: + * dialog.el (yes-or-no-p-dialog-box): + * dialog.el (yes-or-no-p-maybe-dialog-box): Removed. + * dialog.el (y-or-n-p-maybe-dialog-box): Removed. + * dialog.el (get-dialog-box-response): + * dialog.el (message-or-box): + * dialog.el (make-dialog-box): + * dialog.el (popup-dialog-box): New. + Avoid yes-or-no-p bogosities. + Create a general function `make-dialog-box' to encapsulate all + dialog box methods; easily extendible. popup-dialog-box now obsolete. + + * dumped-lisp.el (preloaded-file-list): + Add dialog-items. Clean up. Group files by types. + + * easymenu.el (easy-menu-add): + * easymenu.el (easy-menu-remove): + Account for accelerators. + + * extents.el: + * extents.el (extent-list): New args, like in map-extents. + * extents.el (extent-at-event): New. + * extents.el (extents-at-event): New. + + * font-lock.el: + * font-lock.el (font-lock-mode): + * font-lock.el (font-lock-default-fontify-buffer): + * font-lock.el (font-lock-default-unfontify-region): + * font-lock.el (font-lock-fontify-syntactically-region): + * font-lock.el (font-lock-fontify-keywords-region): + Use new progress-feedback names. + + * font-lock.el (java-font-lock-identifier-regexp): + * font-lock.el (java-font-lock-class-name-regexp): + Fix bytecompiler warnings. + + * gutter-items.el: + * gutter-items.el (progress-display-use-echo-area): Removed. + * gutter-items.el (progress-feedback-use-echo-area): New. + * gutter-items.el (progress-display-popup-period): Removed. + * gutter-items.el (progress-feedback-popup-period): New. + * gutter-items.el (set-progress-display-style): Removed. + * gutter-items.el (set-progress-feedback-style): New. + * gutter-items.el (progress-display-style): Removed. + * gutter-items.el (progress-feedback-style): New. + * gutter-items.el (progress-stack): + * gutter-items.el (progress-displayed-p): Removed. + * gutter-items.el (progress-feedbacked-p): New. + * gutter-items.el (clear-progress-display): Removed. + * gutter-items.el (clear-progress-feedback): New. + * gutter-items.el (progress-display-clear-when-idle): Removed. + * gutter-items.el (progress-feedback-clear-when-idle): New. + * gutter-items.el (remove-progress-display): Removed. + * gutter-items.el (remove-progress-feedback): New. + * gutter-items.el (progress-display-dispatch-non-command-events): Removed. + * gutter-items.el (progress-feedback-dispatch-non-command-events): New. + * gutter-items.el (append-progress-display): Removed. + * gutter-items.el (append-progress-feedback): New. + * gutter-items.el (abort-progress-display): Removed. + * gutter-items.el (abort-progress-feedback): New. + * gutter-items.el (raw-append-progress-display): Removed. + * gutter-items.el (raw-append-progress-feedback): New. + * gutter-items.el (display-progress-display): Removed. + * gutter-items.el (display-progress-feedback): New. + * gutter-items.el (current-progress-display): Removed. + * gutter-items.el (current-progress-feedback): New. + * gutter-items.el (current-progress-display-label): Removed. + * gutter-items.el (current-progress-feedback-label): New. + * gutter-items.el (progress-display): Removed. + * gutter-items.el (progress-feedback): New. + Replace "progress-display" with "progress-feedback" globally. + + * gutter-items.el (lprogress-display): Removed. + * gutter-items.el (progress-feedback-with-label): New. + Rename lprogress-display ==> progress-feedback-with-label. + + * gutter-items.el (search-dialog-direction): Removed. + * gutter-items.el (search-dialog-text): Removed. + * gutter-items.el (search-dialog-callback): Removed. + * gutter-items.el (make-search-dialog): Removed. + Move to dialog-items.el. + + * help.el: + * help.el (help-mode-quit): + * help.el (mode-for-help): New. + * help.el (help-sticky-window): New. + * help.el (help-window-config): New. + * help.el (with-displaying-help-buffer): + * help.el (function-at-event): New. + * help.el (help-symbol-regexp): New. + * help.el (help-symbol-run-function-1): New. + * help.el (help-symbol-run-function): New. + * help.el (help-symbol-function-context-menu): New. + * help.el (help-symbol-variable-context-menu): New. + * help.el (help-symbol-function-and-variable-context-menu): New. + * help.el (frob-help-extents): New. + * help.el (describe-function-1): + * help.el (variable-at-point): + * help.el (variable-at-event): New. + * help.el (describe-variable): + Major overhaul. + - Make functions and variables be mousable. + - Middle button hyperlinks. + - New context-menu entries. + + * keydefs.el: + * keydefs.el (global-map): + New key bindings to move lines up and down. + + * lisp-mode.el: + * lisp-mode.el (construct-lisp-mode-menu): New. + * lisp-mode.el (emacs-lisp-mode-popup-menu): + * lisp-mode.el (lisp-interaction-mode-menubar-menu): + * lisp-mode.el (emacs-lisp-mode-menubar-menu): + * lisp-mode.el (lisp-indent-function): Indent "flet" entries better. + Make popup and menubar menus be different. Popup menu uses + clicked location and automatically assumes symbol under the mouse + for various commands. + + * menubar-items.el: + * menubar-items.el (bookmark-menu-filter): Add accelerators. + * menubar-items.el (buffers-menu-omit-chars-list): Include 'd'. + + * menubar-items.el (global-popup-menu): Removed. + * menubar-items.el (mode-popup-menu): Removed. + * menubar-items.el (activate-popup-menu-hook): Removed. + * menubar-items.el (popup-mode-menu): Removed. + * menubar-items.el (popup-buffer-menu): Removed. + * menubar-items.el (popup-menubar-menu): Removed. + Move to menubar.el. + + * menubar.el: + * menubar.el (global-popup-menu): New. + * menubar.el (mode-popup-menu): New. + * menubar.el (activate-popup-menu-hook): New. + * menubar.el (last-popup-menu-event): New. + * menubar.el (popup-mode-menu): New. + * menubar.el (popup-buffer-menu): New. + * menubar.el (popup-menubar-menu): New. + * menubar.el (menu-call-at-event): New. + Move non-content functions here. Add support for context menu + items on extents. + + * minibuf.el (minibuffer-history-uniquify): + Typo fix. + + * minibuf.el (read-file-name-1): + Call new file dialog box if it exists. + + * minibuf.el (mouse-rfn-setup-vars): + Clean up "chop" action. + + * mouse.el: + * mouse.el (button2): Now bound to mouse-track. + * mouse.el (click-inside-extent-p): + * mouse.el (point-inside-extent-p): + * mouse.el (point-inside-selection-p): + * mouse.el (mouse-drag-or-yank): Removed. + * mouse.el (mouse-begin-drag-n-drop): New. + * mouse.el (mouse-eval-sexp): + * mouse.el (mouse-track-activate-strokes): New. + * mouse.el (mouse-track-do-activate): New. + * mouse.el (mouse-track): + * mouse.el (default-mouse-track-event-is-with-button): New. + * mouse.el (default-mouse-track-cleanup-hook): + * mouse.el (default-mouse-track-drag-hook): + * mouse.el (default-mouse-track-drag-up-hook): + * mouse.el (default-mouse-track-click-hook): + Merge drag-n-drop into mouse-track. + Add general "activate" support to replace specific button2 kludges. + Use "button modifier" support in mouse-track. + + * package-get.el (package-get-dependencies): Fix bytecompiler warnings. + + * package-ui.el: + * package-ui.el (pui-menu): + * package-ui.el (pui-popup-context-sensitive): Removed. + Fix bytecompiler warnings. + Clean up popup code a bit. + + * select.el (get-selection-no-error): Fix bytecompiler warnings. + + * simple.el: + * simple.el (transpose-lines): + * simple.el (transpose-line-up): New. + * simple.el (transpose-line-down): New. + * simple.el (transpose-subr): + * simple.el (transpose-subr-1): Removed. + Clean up, add functions to move lines up and down. + + * startup.el (mail-host-address): + * startup.el (user-mail-address): + Customize. + + * subr.el: + * subr.el (set-symbol-value-in-buffer): New. + * subr.el (error): + * subr.el (check-argument-type): + * subr.el (defined-error-p): New. + Add structured error support. + + * toolbar-items.el (toolbar-compile): + Use new make-dialog-box. + + * update-elc.el: + + * userlock.el (ask-user-about-lock-dbox): + * userlock.el (ask-user-about-supersession-threat-dbox): + * userlock.el (ask-user-about-lock): + * userlock.el (ask-user-about-supersession-threat): + Use new make-dialog-box. + Add safety checks; use should use-dialog-box-p. + + * window-xemacs.el: + * window-xemacs.el (__buffer-dedicated-frame): + * window-xemacs.el (buffer-dedicated-frame): New. + * window-xemacs.el (set-buffer-dedicated-frame): New. + Move dedicated-frame stuff into lisp. 2000-07-18 Kirill 'Big K' Katsnelson @@ -9187,11 +10822,11 @@ * custom-load.el (faces): - * finder.el (finder-compile-keywords): from Dan Holmsand, make sure - dir is a regex. - - * process.el (call-process-internal): from Dan Holmsand, use binary - coding systems so that jka-compr works. + * finder.el (finder-compile-keywords): from Dan Holmsand, make sure + dir is a regex. + + * process.el (call-process-internal): from Dan Holmsand, use binary + coding systems so that jka-compr works. 2000-07-07 Ben Wing @@ -9537,13 +11172,13 @@ gutter behavior is just wrong, as per this comment: ;; this used to add the norecord flag to both calls below. - ;; this is bogus because it is a pervasive assumption in XEmacs - ;; that the current buffer is at the front of the buffers list. - ;; for example, select an item and then do M-C-l - ;; (switch-to-other-buffer). Things get way confused. - ;; - ;; Andy, if you want to maintain the current look, you must - ;; *uncouple* the gutter order and buffers order. + ;; this is bogus because it is a pervasive assumption in XEmacs + ;; that the current buffer is at the front of the buffers list. + ;; for example, select an item and then do M-C-l + ;; (switch-to-other-buffer). Things get way confused. + ;; + ;; Andy, if you want to maintain the current look, you must + ;; *uncouple* the gutter order and buffers order. * loaddefs.el (completion-ignored-extensions): unfuckify. @@ -9928,17 +11563,17 @@ * 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. + * 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): @@ -9950,18 +11585,18 @@ 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. + * 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. + 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 @@ -9973,14 +11608,14 @@ * 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. + 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. + Added accelerators to the dialog buttons. * menubar-items.el (menu-truncate-list): New internal function. @@ -9999,11 +11634,11 @@ * 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 + 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, @@ -10019,88 +11654,88 @@ 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. + 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. + 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. + 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. + 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. + 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. @@ -10112,38 +11747,38 @@ * 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. + 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): @@ -10157,21 +11792,21 @@ 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. + * 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 @@ -10334,7 +11969,7 @@ (byte-optimize-multiply): Optimize (- 0) to 0, not (-) Optimize (+ 5 3.0) to 8.0 - Optimize (* 5 3.0) to 15.0 + Optimize (* 5 3.0) to 15.0 Improve readability. 2000-02-21 Jonathan Harris @@ -10363,17 +11998,17 @@ 1999-12-06 Hirokazu FUKUI - Shuhei KOBAYASHI + 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. + * 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. + * package-get.el (package-get-download-sites): Use correct custom + type. 2000-02-15 Kirill 'Big K' Katsnelson @@ -10405,8 +12040,8 @@ 2000-02-16 Samuel Mikes - * etags.el (find-tag): force new window -- even if buf already - visible -- when other-window is t + * etags.el (find-tag): force new window -- even if buf already + visible -- when other-window is t 2000-02-16 Martin Buchholz @@ -10463,7 +12098,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 @@ -10840,10 +12475,10 @@ 1999-11-06 Jason R Mastaler - * package-get.el (package-get-download-sites): Removed several - defunct download sites, added many new ones, and corrected a few - incorrect directory-on-site entries. Added physical locations to - site-description. + * package-get.el (package-get-download-sites): Removed several + defunct download sites, added many new ones, and corrected a few + incorrect directory-on-site entries. Added physical locations to + site-description. 1999-11-30 Gunnar Evermann @@ -10980,20 +12615,20 @@ 1999-08-19 Stephen Tse * process.el (open-network-stream): Add a new optional parameter - PROTOCOL to support udp; fix a minor typo and add an explanation - in docstring for udp programming. + PROTOCOL to support udp; fix a minor typo and add an explanation + in docstring for udp programming. * code-process.el (open-network-stream): Add a new optional - parameter PROTOCOL to support udp; fix a minor typo and add an - explanation in docstring for udp programming. + parameter PROTOCOL to support udp; fix a minor typo and add an + explanation in docstring for udp programming. 1999-10-18 Andy Piper * gui.el (make-gui-button): be more precise about how we call - callbacks. + callbacks. * wid-edit.el (widget-push-button-value-create): Use the new form - of native gui-button. + of native gui-button. 1999-10-14 Yoshiki Hayashi @@ -11002,15 +12637,15 @@ 1999-10-13 Andy Piper * gutter-items.el (progress-abort-glyph): new glyph for showing - abort status. + abort status. (append-progress): dispatch-event rather than sit-for. (abort-progress): new function. Show the abort glyph with an - appropriate message. + appropriate message. (raw-append-progress): dispatch-event rather than sit-for. (display-progress): cope with aborts. * gui.el (make-gui-button): Use native widgets for buttons - unconditionally. + unconditionally. (insert-gui-button): ditto. (gui-button-p): ditto. @@ -11021,7 +12656,7 @@ 1999-10-07 Olivier Galibert * faces.el (init-device-faces): Don't initialize the random faces - on the stream device. + on the stream device. 1999-10-06 Andy Piper @@ -11030,7 +12665,7 @@ 1999-09-25 Adrian Aichner * package-get.el (package-get-download-menu): Make menu really - toggle download sites. + toggle download sites. (package-get-download-sites): Add autoload cookie. 1999-09-29 Michael Sperber [Mr. Preprocessor] @@ -11052,26 +12687,26 @@ 1999-08-28 Mike Woolley * winnt.el: Removed nt-shell-mode-hook, which was preventing the - user setting comint-completion-addsuffix and - comint-process-echoes. + user setting comint-completion-addsuffix and + comint-process-echoes. 1999-09-22 Andy Piper * gutter-items.el (update-tab-in-gutter): use - last-nonminibuf-window instead of selected-window. + last-nonminibuf-window instead of selected-window. 1999-09-18 Andy Piper * gnuserv.el (gnuserv-edit-files): select frame we are going to - display on. + display on. * subr.el (record-buffer-hook): new variable so that the hook gets - some documentation. + some documentation. 1999-09-16 Andy Piper * gutter-items.el (update-tab-in-gutter): only update when the - gutter is visible. + gutter is visible. (remove-buffer-from-gutter-tab): ditto. 1999-09-17 Hrvoje Niksic @@ -11082,7 +12717,7 @@ 1999-09-14 Hrvoje Niksic * isearch-mode.el (isearch-highlightify-region): Give the - highlighting extents a high priority. + highlighting extents a high priority. (isearch-make-extent): Give the main highlighting extent an even higher priority. @@ -11097,8 +12732,8 @@ `configure-doc-directory.' * find-paths.el (paths-find-architecture-directory): Give - precendence `default' argument (which typically comes from - configure). + precendence `default' argument (which typically comes from + configure). 1999-09-05 Michael Sperber [Mr. Preprocessor] @@ -11128,23 +12763,23 @@ 1999-09-08 Hrvoje Niksic * isearch-mode.el (isearch-done): Be sure to restore invisible - extents in the proper buffer. + extents in the proper buffer. (isearch-pre-command-hook): Set this-command to the correct value - in case the buffer has changed and old overriding-local-map was - used. + in case the buffer has changed and old overriding-local-map was + used. (isearch-restore-extent): Use remprop instead of setting the property to nil. 1999-09-08 Hrvoje Niksic * cmdloop.el (execute-extended-command): Update zmacs region - before the delay. + before the delay. (execute-extended-command): Make the message gettext-friendly. 1999-09-07 Andy Piper * gutter-items.el (progress-gauge-glyph): renamed from - progress-glyph. + progress-glyph. (progress-text-glyph): new variable. (progress-layout-glyph): use layouts and text glyphs. (progress-area-buffer): removed. @@ -11154,13 +12789,13 @@ (raw-append-progress): ditto. (append-progress): use new glyph names. (raw-append-progress): only create the extent when needed. set - properties more optimally. + properties more optimally. (progress): remove args. 1999-09-07 Hrvoje Niksic * isearch-mode.el (isearch-range-invisible): Use mapc instead of - mapcar where the return value is unused. + mapcar where the return value is unused. (isearch-restore-invisible-extents): Ditto. (isearch-highlight-all-cleanup): Ditto. (isearch-delete-extents-in-range): Traverse the extents only once. @@ -11185,7 +12820,7 @@ * isearch-mode.el (isearch-top-state): Restore isearch-word. (isearch-yank-clipboard): Renamed from isearch-yank-x-clipboard. (isearch-yank-clipboard): Use get-clipboard instead of - x-get-clipboard. + x-get-clipboard. (isearch-yank-selection): Fix docstring. 1999-09-02 Martin Buchholz @@ -11210,22 +12845,22 @@ (isearch-restore-extent): Ditto. * isearch-mode.el (isearch-ring-advance-edit): Use FSF - implementation. + implementation. (isearch-ring-retreat-edit): Ditto. (isearch-forward): New argument NO-RECURSIVE-EDIT. (isearch-forward-regexp): New arguments NOT-REGEXP and - NO-RECURSIVE-EDIT. + NO-RECURSIVE-EDIT. (isearch-backward): New argument NO-RECURSIVE-EDIT. (isearch-backward-regexp): New arguments NOT-REGEXP and - NO-RECURSIVE-EDIT. + NO-RECURSIVE-EDIT. (isearch-mode): Return isearch-success. (isearch-update): Use unread-command-events instead of - unread-command-event. + unread-command-event. (isearch-abort): If an invalid regexp is encountered, keep popping - states. + states. (isearch-*-char): Use FSF implementation. (isearch-whitespace-chars): Use the more robust FSF's - implementation. + implementation. (isearch-within-brackets): New variable. (isearch-mode): Initialize it. (isearch-edit-string): Bind it. @@ -11245,7 +12880,7 @@ 1999-09-01 Hrvoje Niksic * isearch-mode.el (isearch-edit-string): Use the head of the - search ring instead of search-last-string and search-last-regexp. + search ring instead of search-last-string and search-last-regexp. (search-highlight): Renamed from isearch-highlight. (isearch-exit): Use the new name. (isearch-highlight): Ditto. @@ -11267,7 +12902,7 @@ (x-yank-clipboard-selection): obsolete * select.el (disown-selection): need to be careful to disown the - clipboard if we set it via selection. + clipboard if we set it via selection. (get-clipboard): move from x-select.el (yank-clipboard-selection): ditto. @@ -11288,11 +12923,11 @@ 1999-09-01 Hrvoje Niksic * isearch-mode.el (isearch-edit-string): Call isearch-message - before reading the event so that the prompt is displayed properly. + before reading the event so that the prompt is displayed properly. (isearch-message): Use isearch-nonincremental when calling - isearch-message-prefix. + isearch-message-prefix. (minibuffer-local-isearch-map): Bind up and down to do the same as - M-p and M-n respectively. + M-p and M-n respectively. (isearch-done): New arg NOPUSH. (isearch-edit-string): Use it. (isearch-edit-string): Don't bind isearch-string. @@ -11301,39 +12936,39 @@ 1999-08-31 Hrvoje Niksic * faces.el (isearch-secondary): Make isearch-secondary look - different than default. + different than default. 1999-08-30 Hrvoje Niksic * isearch-mode.el (isearch-yank): Use progn instead of the inner - save-excursion. + save-excursion. (isearch-dehighlight): Remove TOTALLY. Simplify. (isearch-update): Call isearch-dehighlight without arguments. (isearch-done): Ditto. * isearch-mode.el (isearch-fix-case): If the search string has no - upper-case letters, allow the folding to be reenabled. - Previously, once disabled, the folding would remain that way until - the end of isearch. + upper-case letters, allow the folding to be reenabled. + Previously, once disabled, the folding would remain that way until + the end of isearch. (isearch-top-state): Call isearch-fix-case. * isearch-mode.el (isearch-yank): Use progn instead of the inner - save-excursion. + save-excursion. (isearch-dehighlight): Remove TOTALLY. Simplify. 1999-08-31 Jan Vroonhof * xpm-button.el: xbm-button.el: Need to exist in core because gui.el depends on - them. + them. 1999-08-31 Andy Piper * gutter-items.el (buffers-tab-face): new customizable variable. (buffers-tab-default-buffer-line-length): new specifier for - maximum viewable characters. + maximum viewable characters. (progress-stack): new variable for implementing widget-based - progress messages. + progress messages. (progress-area-buffer): ditto. (progress-glyph-height): ditto. (progress-stop-callback): ditto. @@ -11341,7 +12976,7 @@ (progress-glyph): new variable. (progress-layout-glyph): ditto. (progress-displayed-p): new function, see message-displayed-p for - details. + details. (clear-progress): ditto. (remove-progress): ditto. (append-progress): ditto. @@ -11358,10 +12993,10 @@ * obsolete.el (isearch-yank-x-selection): Define obsolete alias. * isearch-mode.el (isearch-yank-x-selection): Renamed to - `isearch-yank-selection'. + `isearch-yank-selection'. (isearch-mode-map): Use it. (isearch-yank-selection): Use `get-selection' instead of - `get-x-selection'. + `get-x-selection'. 1999-08-29 Hrvoje Niksic @@ -11383,7 +13018,7 @@ 1999-08-23 Andy Piper * gutter-items.el (update-tab-in-gutter): call add-tab-to-gutter - here if we don't have one. + here if we don't have one. 1999-08-15 Oscar Figueiredo @@ -11408,10 +13043,10 @@ 1999-08-17 Andy Piper * gutter-items.el (buffers-tab-format-buffer-line-function): use - format-buffers-tab-line. + format-buffers-tab-line. (buffers-tab-max-buffer-line-length): new variable. (format-buffers-tab-line): new function. truncate names if over - buffers-tab-max-buffer-line-length. + buffers-tab-max-buffer-line-length. 1999-08-13 Charles G Waldman @@ -11420,14 +13055,14 @@ 1999-08-16 Andy Piper * gutter-items.el (remove-buffer-from-gutter-tab): take a - brute-force approach to deleting the last buffer. + brute-force approach to deleting the last buffer. (buffers-tab-grouping-regexp): new customizable variable. (select-buffers-tab-buffers-by-mode): use it. 1999-08-13 Andy Piper * gutter-items.el (remove-buffer-from-gutter-tab): fix *scratch* - deletion problem. + deletion problem. 1999-07-30 Didier Verna @@ -11445,18 +13080,18 @@ 1999-08-08 Andy Piper * gutter-items.el (select-buffers-tab-buffers-by-mode): beef up to - cope with similar mode names. + cope with similar mode names. * gutter-items.el (buffers-tab-selection-function): new selection - function. + function. (select-buffers-tab-buffers-by-mode): new function. (buffers-tab-items): use it if set to only display buffers in the - tab in the current buffer's group.. + tab in the current buffer's group.. (update-tab-in-gutter): use new api. (remove-buffer-from-gutter-tab): ditto. * gutter-items.el (buffers-tab-max-size): set custom selection - default to 6. + default to 6. (buffers-tab-switch-to-buffer): just switch window if the window is visible. (add-tab-to-gutter): set face as default. @@ -11468,19 +13103,19 @@ 1999-08-05 Andy Piper * gutter-items.el (update-tab-in-gutter): add frame argument for - buffer-items. + buffer-items. (update-tab-in-gutter): use it. * gutter-items.el (record-buffer-hook): set. * buffer.el (switch-to-buffer): back out switch-to-buffer-hook - change. + change. (switch-to-buffer-hook) deleted. 1999-08-04 Andy Piper * gutter-items.el (update-tab-in-gutter): make sure this will work - as an argument to create-frame-hook. + as an argument to create-frame-hook. 1999-07-30 Hrvoje Niksic @@ -11490,14 +13125,14 @@ 1999-07-30 Darryl Okahata * isearch-mode.el: Merged Bob Glickstein's GNU - Emacs isearch enhancements. + Emacs isearch enhancements. 1999-07-28 Andy Piper * gutter-items.el (add-tab-to-gutter): put in specifier specs for - all devices that support tab controls. + all devices that support tab controls. (remove-buffer-from-gutter-tab): new function. to be used as a - value for kill-buffer-hook. + value for kill-buffer-hook. 1999-07-21 Sean MacLennan @@ -11551,7 +13186,7 @@ 1999-07-22 Andy Piper * dumped-lisp.el (preloaded-file-list): guard against putting - gutter-items in a less than functional XEmacs. + gutter-items in a less than functional XEmacs. * gutter-items.el: put call to `add-tab-to-gutter' back in. 1999-07-18 Bob Weiner @@ -12131,7 +13766,7 @@ * rect.el: all functions rewritten, except when noted. Below is a list of interface changes. - (apply-on-rectangle): new function. Obsoletes + (apply-on-rectangle): new function. Obsoletes `operate-on-rectangle'. All functions that used to call this function now call the new one. (kill-rectangle): added optional prefix arg to fill lines. @@ -12156,10 +13791,10 @@ (gutter-buffers-tab): widget to put in the gutter. (buffers-tab-max-size): max number of tabs. (buffers-tab-switch-to-buffer-function): function to call when a - tab is pressed. + tab is pressed. (buffers-tab-omit-function): filter buffers with this function. (buffers-tab-format-buffer-line-function): format buffer names for - inclusion in tabs. + inclusion in tabs. (buffers-tab-switch-to-buffer): like switch-to-buffer but without the record. (build-buffers-tab-internal): build a list of tab items. @@ -12322,7 +13957,7 @@ 1999-06-25 Charles G Waldman - * cus-face.el (custom-face-italic): insert missing args + * cus-face.el (custom-face-italic): insert missing args 1999-06-24 Michael Sperber [Mr. Preprocessor] @@ -12397,7 +14032,7 @@ 1999-06-09 MORIOKA Tomohiko * mule/cyrillic.el (cyrillic-koi8-r-decode-table): Set 32 for - missing characters to avoid crash. + missing characters to avoid crash. 1999-06-09 Jan Vroonhof @@ -12413,25 +14048,25 @@ (face-spec-set): * faces.el (frob-face-property): * font-menu.el (font-menu-set-font): - Actually apply changes from 1999-03-17 + Actually apply changes from 1999-03-17 1999-06-10 Andy Piper * select.el (get-selection): abstract out non error-signalling - part. + part. (get-selection-no-error): get-selection without signalling an - error. + error. (selection-is-clipboard-p): new variable. controls whether the - selection sets the clipboard. + selection sets the clipboard. (own-selection): use it. * mouse.el (insert-selection): fallback to clipboard after trying - primary selection and cutbuffer. + primary selection and cutbuffer. 1999-06-05 Andy Piper * x-select.el (xselect-kill-buffer-hook-1): use generalised - selection functions. + selection functions. 1999-06-04 MORIOKA Tomohiko @@ -12536,28 +14171,28 @@ 1999-06-02 Andy Piper * x-font-menu.el (x-font-menu-load-font): - font-menu-registry-encoding -> x-font-menu-registry-encoding type. + font-menu-registry-encoding -> x-font-menu-registry-encoding type. 1999-05-31 Andy Piper * font-menu.el (font-menu-ignore-scaled-fonts): move to font-menu - group. + group. (font-menu-this-frame-only-p): ditto. (font-menu-max-items): reinstate, from Jan Vroonhof - + (font-menu-submenu-name-format): ditto. (font-menu-split-long-menu): ditto, for use by the family - constructor. + constructor. (font-menu-family-constructor): use it. 1999-05-30 Andy Piper * msw-faces.el (mswindows-font-regexp): new font matching regexp - for use by the font menu. + for use by the font menu. * msw-font-menu.el: new file implementing mswindows specific - font-menu behaviour. - (mswindows-font-menu-registry-encoding): new function mirroring x version. + font-menu behaviour. + (mswindows-font-menu-registry-encoding): new function mirroring x version. (mswindows-font-menu-junk-families): ditto. (hack-font-truename): ditto. (mswindows-font-regexp-ascii): ditto. @@ -12570,21 +14205,21 @@ (x-font-menu-load-font): ditto. * font-menu.el: new file implementing generic font menu behaviour. - (font-menu-ignore-scaled-fonts): copied from x-font-menu.el and - made device independent. + (font-menu-ignore-scaled-fonts): copied from x-font-menu.el and + made device independent. (font-menu-this-frame-only-p): ditto. (font-menu-preferred-resolution): ditto. (font-menu-size-scaling): new variable used to determine whether - sizes are in points or tenths of a point. + sizes are in points or tenths of a point. (vassoc): moved from x-font-menu.el. (device-fonts-cache): ditto. (device-fonts-cache): ditto. (flush-device-fonts-cache): ditto. (reset-device-font-menus): copied from x-font-menu.el and made - device independent. Most functionality deferred to - device-dependent versions. + device independent. Most functionality deferred to + device-dependent versions. (font-menu-family-constructor): copied from x-font-menu.el and - made device independent. + made device independent. (font-menu-size-constructor): ditto. (font-menu-weight-constructor): ditto. (font-menu-set-font): ditto. @@ -12623,7 +14258,7 @@ (xselect-convert-to-integer): (xselect-convert-to-atom): (xselect-convert-to-identity): functions renamed from x-* and - moved to select.el. + moved to select.el. (x-get-secondary-selection): use rename get-selection. (x-get-clipboard): ditto. (x-own-selection): moved to select.el. @@ -12637,7 +14272,7 @@ (x-set-point-and-move-selection): use renamed function. * select.el (selected-text-type): moved and renamed from - x-select.el. + x-select.el. (selection-owner-p): moved to C. (selection-exists-p): ditto. (get-cutbuffer): new device method. @@ -12645,7 +14280,7 @@ (own-selection): moved x-own-selection functionality into here. (dehilight-selection): renamed and moved from x-select.el. (own-clipboard): functionality moved from x-select.el using new - generic C builtins. + generic C builtins. (disown-clipboard): ditto. (select-convert-to-text): (select-convert-to-string): @@ -12666,10 +14301,10 @@ (select-convert-to-integer): (select-convert-to-atom): (select-convert-to-identity): new functions renamed from x-* and - moved from x-select.el. + moved from x-select.el. * mouse.el (mouse-consolidated-yank): subsume x-yank-function - into here and use as the default window-system mouse yank. + into here and use as the default window-system mouse yank. (insert-selection): generalised and moved from x-mouse.el. (own-clipboard): moved to C. @@ -12684,7 +14319,7 @@ 1999-05-13 SL Baur - * about.el: update contact info for jason and slb. + * about.el: update contact info for jason and slb. 1999-05-13 SL Baur @@ -12748,19 +14383,19 @@ 1999-05-03 Hrvoje Niksic * packages.el (packages-unbytecompiled-lisp): Installation.el is - dead. + dead. 1999-05-03 Hrvoje Niksic * dumped-lisp.el (preloaded-file-list): Don't load - Installation.el. + Installation.el. * loadup.el (Installation-string): Define it here. 1999-05-03 Hrvoje Niksic * dumped-lisp.el (preloaded-file-list): Revert previous change -- - Installation.el needs to be loaded before `dump-paths', otherwise + Installation.el needs to be loaded before `dump-paths', otherwise the dumping process won't find it. 1999-03-13 Adrian Aichner @@ -12774,7 +14409,7 @@ * make-docfile.el: canonicalize file and directory names. * device.el (call-device-method): new function for calling device - specific methods. + specific methods. (define-device-method): new function for defining device methods. (define-device-method*): ditto. @@ -12823,11 +14458,11 @@ 1999-04-11 Oscar Figueiredo * ldap.el (ldap-host-parameters-alist): Make `Search Base' appear - at the top of the buffer since it is the most important thing to - customize + at the top of the buffer since it is the most important thing to + customize (ldap-get-host-parameter): New defun (ldap-search): Add a new parameter `withdn' to retrieve the - distinguished names of entries + distinguished names of entries 1999-04-22 Kai Haberzettl @@ -12844,21 +14479,21 @@ 1999-04-17 Hrvoje Niksic * wid-edit.el (widget-glyph-find): Search by directories, then by - suffixes rather than the other way around. + suffixes rather than the other way around. (widget-image-conversion): Renamed to - `widget-image-file-name-suffixes'. + `widget-image-file-name-suffixes'. 1999-04-16 Olivier Galibert * mule/mule-charset.el: Made old functions obsolete, remove the - unspeakably evil (and inexistant in fsf's) charset-leading-byte. - (charset-iso-graphic-plane): Rename from charset-graphic. + unspeakably evil (and inexistant in fsf's) charset-leading-byte. + (charset-iso-graphic-plane): Rename from charset-graphic. (charset-iso-final-char): Rename from charset-final. (charset-width): Rename from charset-columns. (charset-bytes): Added from fsf compatibility, returns always 1. * mule/mule-misc.el: Move charset-doc-string alias to - mule-charset.el + mule-charset.el 1999-04-14 Colin Rafferty @@ -12872,7 +14507,7 @@ 1998-12-02 Hrvoje Niksic * x-faces.el (try-oblique-before-italic-fonts): Use the right - name. + name. 1999-04-14 Dave Gillesipe @@ -13110,14 +14745,14 @@ 1999-01-07 Colin Rafferty * window.el (shrink-window-if-larger-than-buffer): Clean up. Only - abort if current window is split horizontally, not if others are - split. Got rid of unnecessary minibuffer checking. Also, add - some comments (it's still complex). + abort if current window is split horizontally, not if others are + split. Got rid of unnecessary minibuffer checking. Also, add + some comments (it's still complex). 1999-01-12 Robert Pluim * package-get.el: changed address for doc.ic.ac.uk to - sunsite.doc.ic.ac.uk + sunsite.doc.ic.ac.uk 1999-01-09 Oscar Figueiredo @@ -13834,18 +15469,18 @@ * packages.el: Added new function, `package-delete-name', to delete existing packages from the installed package database - (`packages-package-list'). Also added the "pkginfo" directory - to `packages-special-base-regexp', so that the pkginfo directory - would not get added to `late-packages'. + (`packages-package-list'). Also added the "pkginfo" directory + to `packages-special-base-regexp', so that the pkginfo directory + would not get added to `late-packages'. * package-admin.el: Added ability to delete an installed package (added low-level function, `package-admin-delete-package'). - Understands how to use the pkginfo/MANIFEST. file to - delete the package. When installing a package, will also - create a MANIFEST.* file if one is not provided by the - package. If the MANIFEST.* doesn't exist when deleting a - package, the functions will fall back to attempting to delete - any package-specific lisp directory. + Understands how to use the pkginfo/MANIFEST. file to + delete the package. When installing a package, will also + create a MANIFEST.* file if one is not provided by the + package. If the MANIFEST.* doesn't exist when deleting a + package, the functions will fall back to attempting to delete + any package-specific lisp directory. * package-get.el: Moved some functions to package-admin.el. Added interactive function `package-get-delete-package', for @@ -13897,7 +15532,7 @@ in addition for .tar.gz files. Tries to reload auto-autoloads, as a convenience when loading new packages, and also tries to add any new package paths to `load-path'. - Changed all occurences of `concat' to use `expand-file-name'. + Changed all occurences of `concat' to use `expand-file-name'. * package-ui.el: New file which implements the main visual package browser/installer, which is started via a menu pick or @@ -14289,14 +15924,14 @@ 1998-07-05 Andy Piper * faces.el (xpm-color-symbols): remove hardcoded defaults these - are handled by the gui-element face fallbacks now. + are handled by the gui-element face fallbacks now. * x-faces.el: default gui-element face to "background" as well as - the default face. + the default face. * msw-faces.el (mswindows-init-device-faces): remove gui-element - and default face settings since these are set as fallbacks now in - the appropriate domain. + and default face settings since these are set as fallbacks now in + the appropriate domain. 1998-07-02 SL Baur @@ -14601,7 +16236,7 @@ 1998-05-30 Kirill M. Katsnelson * obsolete.el (has-modeline-p): Added obsolete alias `has-modeline-p' - for `modeline-visible-p' + for `modeline-visible-p' * winnt.el (nt-quote-process-args): Fix for duplicating argv[0]. @@ -14745,7 +16380,7 @@ * modeline.el (mouse-drag-modeline): Use it. * lisp-mode.el (with-specifier-instance): Define its indentation - level. + level. * specifier.el (with-specifier-instance): New macro. @@ -14827,7 +16462,7 @@ * find-paths.el (paths-find-recursive-path): Exclusion is now by a regexp instead of a list of base names. - (paths-version-control-filename-regexp): + (paths-version-control-filename-regexp): (paths-lisp-filename-regexp): (paths-no-lisp-directory-regexp): Introduced and used following the interface change of `paths-find-recursive-path'. @@ -15054,7 +16689,7 @@ was seen gracefully. * apropos.el (apropos-print): Use with-displaying-help-buffer as - defun. + defun. (apropos-describe-plist): Ditto. * help.el (with-displaying-help-buffer): Revert to a defun. @@ -15081,7 +16716,7 @@ * dragdrop.el (dragdrop-drop-log-function): logging added plus customizations changed interface to handler functions. now called with event - and object + and object 1998-05-12 Kirill M. Katsnelson @@ -16254,7 +17889,7 @@ * "Fast" dired-in-C enhancements for Windows 95/NT: * files.el: Added function, `wildcard-to-regexp', from GNU - Emacs. + Emacs. * files.el (insert-directory): Modified to use special dired-in-C enhancements if present. @@ -16313,17 +17948,17 @@ Tue Feb 17 12:50:37 1998 Andy Piper * code-files.el: new file. a virtual copy of mule-files.el - but without charset - dependencies. (toggle-buffer-file-ocding-system) new function for - changing the eol type for the current buffer. + but without charset + dependencies. (toggle-buffer-file-ocding-system) new function for + changing the eol type for the current buffer. * code-process.el: new file. a copy of - mule-process.el. mule-process.el will disappear when things have - settled. + mule-process.el. mule-process.el will disappear when things have + settled. * coding.el: new file. a virtual copy of mule-files.el but - without charset dependencies. (coding-system-base) new function - for getting the parent coding system of a coding system with eol + without charset dependencies. (coding-system-base) new function + for getting the parent coding system of a coding system with eol type set. * dumped-lisp.el: add above files for the non-mule case. @@ -16601,7 +18236,7 @@ (view-emacs-news): Ditto. * help-nomule.el (help-with-tutorial): Made it use - `locate-data-file' to find tutorial. + `locate-data-file' to find tutorial. 1998-01-28 Jonathon Harris @@ -16752,22 +18387,22 @@ 1998-01-07 Karl M. Hegbloom * modeline.el (modeline-minor-mode-menu): Add support for an - `:included' predicate in the `toggle-sym' plist. + `:included' predicate in the `toggle-sym' plist. (add-minor-mode): Document the :included property, format - docstring some more. + docstring some more. (modeline-minor-mode-menu): Documentation string added. 1998-01-02 Karl M. Hegbloom * modeline.el (modeline-minor-mode-menu): genmenlab the menu - labels from the symbol-names by thwacking off the overly redundant - and overused "mode", parenthesizing "minor", and capitalizing the - resultant strings. Also shortened the menu's title by eliminating - the redundant buffer name. + labels from the symbol-names by thwacking off the overly redundant + and overused "mode", parenthesizing "minor", and capitalizing the + resultant strings. Also shortened the menu's title by eliminating + the redundant buffer name. (add-minor-mode): Beautified the docstring, added mention of the - `:menu-tag' property of TOGGLE. + `:menu-tag' property of TOGGLE. (modeline-minor-mode-menu): Frinked the `:menu-tag' property on - `toggle-sym' to beatify the mode-life menus. + `toggle-sym' to beatify the mode-life menus. * (abbrev-mode): (put)'ed a `:menu-tag' on it and `auto-fill-function'. @@ -16785,7 +18420,7 @@ * packages/hyper-apropos.el (hyper-apropos-insert-face): Would only recognize first hyperlink. (hyper-apropos-highlightify): Deletia, this is already done by - `hyper-apropos-insert-face'. + `hyper-apropos-insert-face'. (hyper-apropos-help-mode): Don't call `hyper-apropos-highlightify. 1998-01-09 SL Baur @@ -16798,8 +18433,8 @@ 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' - will function properly. + `Info-emacs-info-file-name' so that `Info-goto-emacs-command-node' + will function properly. 1998-01-05 Gary D. Foster @@ -16809,7 +18444,7 @@ 1998-01-09 Karl M. Hegbloom * hyper-apropos.el (hyper-apropos-get-doc): Print where a byte - compiled function got loaded from. + compiled function got loaded from. 1998-01-09 SL Baur @@ -16974,7 +18609,7 @@ 1997-12-27 Jens-Ulrik Holger Petersen * help.el (help-mode-bury): Now a call to `help-mode-quit' with - argument. + argument. (help-mode-quit): New optional arg to control whether it kills or buries. Tidied up. (with-displaying-help-buffer): Don't kill buffer initially, even @@ -17016,18 +18651,18 @@ 1997-12-26 Jens-Ulrik Holger Petersen * help.el (help-mode-map): New bindings for `help-mode-bury', - `describe-function-at-point', `describe-variable-at-point', - `Info-elisp-ref', `customize-variable', `help-next-section' and - `help-prev-section'. + `describe-function-at-point', `describe-variable-at-point', + `Info-elisp-ref', `customize-variable', `help-next-section' and + `help-prev-section'. (help-next-section): New function. (help-prev-section): New function. (help-mode-quit): Changed to kill the help buffer. (help-mode-bury): Formerly `help-mode-quit'. Bury buffer - correctly. + correctly. (help-buffer-name): New function to generate the name of help - buffers. + buffers. (with-displaying-help-buffer): Is now a macro. Takes an new first - argument giving the name of the help buffer. + argument giving the name of the help buffer. (describe-key): Use `with-displaying-help-buffer' with name. (describe-mode): Ditto. (describe-bindings): Ditto. @@ -17035,13 +18670,13 @@ (view-lossage): Ditto. (with-syntax-table): New macro. (function-called-at-point): Use `ignore-errors' and - `with-syntax-table'. + `with-syntax-table'. (function-at-point): Ditto. (describe-function): Use `with-displaying-help-buffer' with name. (function-arglist): Extracted from `describe-function-1'. Returns - function's arglist as string. + function's arglist as string. (function-documentation): Extracted from `describe-function-1'. - Returns function's docstring. + Returns function's docstring. (describe-function-1): Remove all the "stream" garbage, including the stream argument. Use `function-arglist' and `function-documentation'. @@ -17106,7 +18741,7 @@ (buffer-tag-table-list): Use `delete-duplicates'. * cl-extra.el (coerce): Coerce to bit-vector and weak-list - correctly. + correctly. (get*): Defalias to `get'. * cl.el (eql): Compare integers with `eq'. @@ -17115,7 +18750,7 @@ 1997-12-17 Didier Verna * leim/quail/latin-pre.el ("french-prefix"): doc string cleanup + - added the 'numero', 'copyright' and 'trademark' symbols. + added the 'numero', 'copyright' and 'trademark' symbols. * leim/quail/latin-post.el ("french-postfix"): see above. @@ -17291,7 +18926,7 @@ 1997-12-12 Hrvoje Niksic * mouse.el (mouse-track-run-hook): Understand `make-local-hook' - convention. + convention. * custom.el (custom-add-version): New function, from FSF. (custom-handle-keyword): Use it. @@ -17317,15 +18952,15 @@ argument to message. * cl-macs.el: New setf methods for: buffer-dedicated-frame, - console-type-image-conversion-list, default-toolbar-position, - device-class, extent-begin-glyph, extent-begin-glyph-layout, - extent-end-glyph, extent-end-glyph-layout, extent-keymap, - extent-parent, extent-properties, frame-selected-window, - itimer-function, itimer-function-arguments, itimer-is-idle, - itimer-recorded-run-time, itimer-restart, itimer-uses-arguments, - itimer-value, keymap-parents, marker-insertion-type, - mouse-pixel-position, trunc-stack-length, trunc-stack-stack, - undoable-stack-max and weak-list-list. + console-type-image-conversion-list, default-toolbar-position, + device-class, extent-begin-glyph, extent-begin-glyph-layout, + extent-end-glyph, extent-end-glyph-layout, extent-keymap, + extent-parent, extent-properties, frame-selected-window, + itimer-function, itimer-function-arguments, itimer-is-idle, + itimer-recorded-run-time, itimer-restart, itimer-uses-arguments, + itimer-value, keymap-parents, marker-insertion-type, + mouse-pixel-position, trunc-stack-length, trunc-stack-stack, + undoable-stack-max and weak-list-list. 1997-12-12 SL Baur @@ -17359,15 +18994,15 @@ 1997-12-08 Hrvoje Niksic * etags.el (find-tag-internal): Set the initial fuzz offset to 100 - instead of 1000. + instead of 1000. (find-tag-internal): Use `letf'. (tags-delete): Removed -- was unused. (set-buffer-tag-table): Use `expand-file-name'. (get-tag-table-buffer): Use `ecase'. (add-to-tag-completion-table): Mark the filename messages with - progress. + progress. (add-to-tag-completion-table): Use `char-after' instead of - `following-char'. + `following-char'. (add-to-tag-completion-table): Use `match-string'. (complete-symbol): Use `error' instead of message+ding. (complete-symbol): Use `skip-syntax-forward'. @@ -17382,7 +19017,7 @@ 1997-12-06 Jonathan Harris - * dumped-lisp.el, emacs.c, symsinit.h, msw-init.el, nt/xemacs.mak + * dumped-lisp.el, emacs.c, symsinit.h, msw-init.el, nt/xemacs.mak Created files: msw-select.el, select-msw.c Copy and paste 8-bit text to/from mswindows clipboard. @@ -17404,7 +19039,7 @@ (toolbar-news-frame-plist): Ditto. * font-lock.el (font-lock-fontify-buffer-function): New variable, - synched with FSF Emacs 20. + synched with FSF Emacs 20. (font-lock-unfontify-buffer-function): Ditto. (font-lock-fontify-region-function): Ditto. (font-lock-unfontify-region-function): Ditto. @@ -17471,7 +19106,7 @@ (set-fill-column): Ditto. * faces.el (get-custom-frame-properties): Don't use - `default-custom-frame-properties'. + `default-custom-frame-properties'. * font-lock.el: Customized variables. @@ -17519,7 +19154,7 @@ 1997-12-03 Hrvoje Niksic * startup.el (load-init-file): Use a warning buffer in case of - error. + error. 1997-12-05 SL Baur @@ -17750,12 +19385,12 @@ 1997-11-18 Colin Rafferty * packages.el (packages-find-packages): Modified to allow `nil' - entry in the `package-path'. All entries before the nil will be - prepended to the paths (as before). All entries after nil will be - appended. + entry in the `package-path'. All entries before the nil will be + prepended to the paths (as before). All entries after nil will be + appended. * packages.el (locate-data-file): Implemented similar to - locate-data-directory. + locate-data-directory. 1997-11-20 Kyle Jones @@ -17883,7 +19518,7 @@ 1997-11-11 Hrvoje Niksic * custom/cus-face.el (custom-face-attributes): Use - `set-face-stipple' instead of `set-face-background-pixmap'. + `set-face-stipple' instead of `set-face-background-pixmap'. * prim/faces.el (set-face-stipple): Search through x-bitmap-file-path. @@ -17922,12 +19557,12 @@ 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 - add a set method which automatically calls - `compilation-build-compilation-error-regexp-alist' when the value - is set by custom. Move declaration below declarations that it now - depends upon. + to note that `compilation-build-compilation-error-regexp-alist' + must be called after changing the value. Update customization to + add a set method which automatically calls + `compilation-build-compilation-error-regexp-alist' when the value + is set by custom. Move declaration below declarations that it now + depends upon. ** (compilation-mouse-motion-initiate-parsing): Default to nil. @@ -18114,7 +19749,7 @@ Wed Nov 05 23:40:00 1997 Jonathan Harris * faces.el: init-other-random-faces - Reinstated code that uses (mono x) as a specifer tag, but + 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. @@ -18153,7 +19788,7 @@ 1997-11-07 Hrvoje Niksic * prim/mouse.el (default-mouse-motion-handler): When over - modeline, correctly dehighlight the last extent. + modeline, correctly dehighlight the last extent. 1997-11-07 Hrvoje Niksic @@ -18162,7 +19797,7 @@ * packages/balloon-help.el (balloon-help-make-help-frame): Ditto. * games/life.el (life-setup): Check for scrollbars before using - them. + them. 1997-11-07 Hrvoje Niksic @@ -18183,7 +19818,7 @@ * utils/browse-cltl2.el (cltl2-lisp-mode-install): Ditto. * modes/view-process-xemacs.el - (View-process-install-pulldown-menu): Ditto. + (View-process-install-pulldown-menu): Ditto. * modes/verilog-mode.el (verilog-mode): Ditto. @@ -18238,7 +19873,7 @@ modeline invalidate `point'. * prim/mouse.el (mouse-line-length): Use point-at-eol and - point-at-bol. + point-at-bol. (default-mouse-track-normalize-point): Highlight the whole symbol only if the mouse is on a symbol-constituent. @@ -18402,9 +20037,9 @@ * prim/subr.el (rplaca): Warn against the return value. (replace-in-string): Use `wrong-type-argument'. Use standard - error message. + error message. (functionp): Would bug out on certain types of objects; synch with - FSF. + FSF. (with-output-to-string): Use new-style backquotes. (with-temp-buffer): Update docstring references. @@ -18456,7 +20091,7 @@ * prim/help-nomule.el (help-with-tutorial): The 'didactic' blank lines message is now taken directly from each tutorial, and thus - can appear in different languages. + can appear in different languages. * mule/mule-help.el (help-with-tutorial): idem @@ -18487,7 +20122,7 @@ 1997-10-30 Karl M. Hegbloom * modes/cperl-mode.el: Add Commentary and Code statements to - comment header for finder. + comment header for finder. 1997-10-30 SL Baur @@ -18705,7 +20340,7 @@ 1997-10-28 Tomasz Cholewo * prim/find-func.el (find-function-noselect): Fix nil argument - handling and add support for dumped macros. + handling and add support for dumped macros. 1997-10-28 SL Baur @@ -18774,8 +20409,8 @@ Fri Aug 8 12:58:00 1997 David Byers * fill.el (fill-region-as-paragraph): When justifying, check for - end-of-buffer at the end of whitespace point is sitting in, and - delete the trailing whitespace if we are on the last line. + end-of-buffer at the end of whitespace point is sitting in, and + delete the trailing whitespace if we are on the last line. 1997-10-24 Hrvoje Niksic @@ -18789,7 +20424,7 @@ 1997-10-20 Hrvoje Niksic * prim/packages.el (locate-library): Make NOSUFFIX not affect - compression. + compression. 1997-10-24 SL Baur @@ -18809,14 +20444,14 @@ 1997-10-22 Karl M. Hegbloom * packages/backup-dir.el (bkup-backup-directory-info): customized, - with :require so it loads automagicly if you've set it. Docstring - updated to reflect that, and reformatted for easier reading. + with :require so it loads automagicly if you've set it. Docstring + updated to reflect that, and reformatted for easier reading. * packages/jka-compr.el (jka-compr-compression-info-list): - Docstring clarification: what does the append flag do? + Docstring clarification: what does the append flag do? * prim/minibuf.el (minibuffer-electric-slash): leave efs prefix - and ~\(blah\)? when / is pressed. + and ~\(blah\)? when / is pressed. 1997-10-24 Jens-Ulrik Holger Petersen @@ -18846,11 +20481,11 @@ 1997-10-22 Karl M. Hegbloom * comint/comint.el (comint-scroll-show-maximum-output): fixups to - docstring, and to :type to allow numbers. + docstring, and to :type to allow numbers. (comint-postoutput-scroll-to-bottom): Added window arg to - `recenter' call to fix the horrid flash and global recentering, - and uncommented the code allowing numeric values for - `comint-scroll-show-maximum-output'. + `recenter' call to fix the horrid flash and global recentering, + and uncommented the code allowing numeric values for + `comint-scroll-show-maximum-output'. 1997-10-23 Hrvoje Niksic @@ -18861,7 +20496,7 @@ 1997-10-23 Karl M. Hegbloom * modes/cperl-mode.el (cperl-here-face): fix the horrible invisible - green default face. + green default face. 1997-10-23 Hrvoje Niksic @@ -18908,7 +20543,7 @@ * custom/cus-edit.el (custom-split-regexp-maybe): Use `split-string'. * custom/cus-start.el (custom-start-quote): Synch with - `custom-quote'. + `custom-quote'. * prim/subr.el (functionp): Synched docstring with Emacs 20.2. @@ -18918,7 +20553,7 @@ 1997-10-21 Hrvoje Niksic * custom/wid-edit.el (radio-button): Use "radio0" as inactive - glyph. + glyph. (widget-visibility-value-create): Use new semantics of `widget-glyph-insert'. @@ -18980,9 +20615,9 @@ 1997-10-18 Hrvoje Niksic * custom/wid-edit.el (widget-push-button-value-create): Require - `xpm-button'. + `xpm-button'. (widget-push-button-value-create): Use :tag-down-glyph and - :tag-inactive-glyph. + :tag-inactive-glyph. (widget-default-create): Use :tag-inactive-glyph. (widget-button-click): Correctly merge faces. @@ -19011,19 +20646,19 @@ (widget-specify-button): Ditto. (widget-glyph-insert-glyph): Ditto. (widget-activation-glyph-mapper): Renamed from - `widget-activation-glyphs-mapper'. + `widget-activation-glyphs-mapper'. * custom/cus-edit.el (Custom-mode-menu): Go to `Easy Customization' node. (boolean): Don't use nested backquotes. * custom/wid-edit.el (widget-field-action): Check whether the new - value is valid before using it. + value is valid before using it. 1997-10-16 Hrvoje Niksic * custom/wid-edit.el (character): Use [\0-\377] instead of . in - :valid-regexp. + :valid-regexp. (widget-color-notify): Use `valid-color-name-p'. (widget-activation-widget-mapper): New function. (widget-specify-inactive): Use it. @@ -19033,7 +20668,7 @@ (widget-toggle-value-create): Use it. (widget-color-sample-face-get): Check for color before setting it. (widget-color-sample-face-get): Store the face object, not its - name. + name. 1997-10-18 Jens-Ulrik Holger Petersen @@ -19071,7 +20706,7 @@ 1997-10-17 Karl M. Hegbloom * packages/info.el (Info-insert-dir): Also kill the localdir temp - buffers. + buffers. 1997-10-17 SL Baur @@ -19132,7 +20767,7 @@ 1997-10-16 Karl M. Hegbloom * prim/files.el (revert-without-query): changed from boolean to - list of regexp as documented in NEWS and its docstring. + list of regexp as documented in NEWS and its docstring. 1997-10-16 SL Baur @@ -19143,8 +20778,8 @@ (floating-toolbar): Whine if no run-time toolbar support is available. - * custom/wid-edit.el (widget-change-glyphs-mapper): cosmetic changes. - From Hrvoje Niksic + * custom/wid-edit.el (widget-change-glyphs-mapper): cosmetic changes. + From Hrvoje Niksic * prim/glyphs.el (init-glyphs): Use different logo for beta XEmacsen. From Didier Verna @@ -19155,27 +20790,27 @@ and `extent-property'. * custom/wid-edit.el (widget-field-value-create): Revert to using - two markers. + two markers. (widget-setup): Ditto. (widget-color-sample-face-get): Get only a unique face per widget. (widget-color-notify): Change the color of the face instead of creating a new one. * packages/add-log.el (add-change-log-entry): Push window - configuration. + configuration. (change-log-exit): New function. (change-log-cancel): Ditto. (change-log-mode-map): Bind them. * custom/wid-edit.el (widget-specify-inactive): Make glyphs look - inactive. + inactive. (widget-change-glyphs-mapper): New function. (widget-glyph-click): Disallow operations on inactive glyphs. 1997-10-14 Hrvoje Niksic * custom/wid-edit.el: (widget-glyph-insert-glyph): Use - `widget-mouse-help' if necessary. + `widget-mouse-help' if necessary. (widget-documentation-string-value-create): Don't coerce help-echo WIDGET to widget. (widget-button-keymap): New keymap. @@ -19189,7 +20824,7 @@ (widget-field-activate): Use `widget-field-find'. * custom/wid-edit.el (widget-button-click): Visually "release" the - button *before* doing the buttonup action. + button *before* doing the buttonup action. (widget-button-click): Reworked. (widget-echo-help): Accept extent. @@ -19288,12 +20923,12 @@ 1997-10-13 Hrvoje Niksic * custom/cus-load.el: Disable gc while loading `custom-load' - files. + files. (custom-put): Added docstring; ignore PROPERTY. * custom/wid-edit.el (widget-previous-button-or-field): If the - point is within a button or field, return the beginning position - of the field. + point is within a button or field, return the beginning position + of the field. * prim/frame.el (frame-list): Use `nconc' instead of `append'. (set-frame-configuration): Use `mapc'. @@ -19316,7 +20951,7 @@ 1997-10-12 Hrvoje Niksic * prim/simple.el (zmacs-deactivate-region): Use `mapc' instead of - `mapcar'. + `mapcar'. (zmacs-make-extent-for-region): Ditto. * custom/cus-dep.el: Updated comments. @@ -19363,19 +20998,19 @@ * '': changed `auto-saves-file-prefix' to "~/.xemacs/saves-" * '' Added toplevel block (when (fboundp 'load-gc) ...to init the - Info-def..list from the environment variable INFOPATH at dump time. + 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 - list. + packages info directories to `Info-default-directory-list' rather + than prepending them. Don't add them if they're already in the + list. * packages/info.el (Info-directory-list): various fixes to the - directory list handling. + directory list handling. * (Info-localdir-heading-regexp) added. * '' removed the unrequired defcustom of `Info-default-directory- - list' + list' 1997-10-11 SL Baur @@ -19553,9 +21188,9 @@ 1997-10-07 Karl M. Hegbloom * psgml/psgml.el (sgml-mode-map): modify defin-key statements to - use the new and improved key designator syntax. Rebound - 'sgml-split-element to a similar key as the global 'split-line - binding. + use the new and improved key designator syntax. Rebound + 'sgml-split-element to a similar key as the global 'split-line + binding. 1997-10-07 Jens-Ulrik Holger Petersen @@ -19564,14 +21199,14 @@ 1997-10-07 Karl M. Hegbloom * modes/cperl-mode.el: Fixed the help toggle menuitem, and added - an autoload cookie. + an autoload cookie. * modes/perl-mode.el: ditch the autoload in favor of cperl-mode. 1997-10-07 Jens-Ulrik Holger Petersen * packages/etags.el (add-to-tag-completion-table): Better support - for Scheme code. Parse scheme definitions and identifiers - with colons correctly. + for Scheme code. Parse scheme definitions and identifiers + with colons correctly. 1997-10-07 SL Baur @@ -19584,7 +21219,7 @@ 1997-10-07 Hrvoje Niksic * x11/x-menubar.el (default-menubar): Handle pending-delete - correctly. + correctly. 1997-10-06 SL Baur @@ -19603,7 +21238,7 @@ 1997-09-29 Karl M. Hegbloom * prim/files.el (auto-mode-alist): make `.cl' a lisp-mode - extension for Franz Allegro CL. + extension for Franz Allegro CL. 1997-10-05 Hrvoje Niksic @@ -19617,20 +21252,20 @@ (xemacs-create-build-report): Added an autoload cookie. * prim/profile.el (profiling-results): Renamed from - `pretty-print-profiling-info'. + `pretty-print-profiling-info'. 1997-10-03 Karl M. Hegbloom * custom/cus-edit.el (custom-save-all): Bind `auto-mode-alist' to - nil around the init file handling to prevent unnecessary automagic - processing. + nil around the init file handling to prevent unnecessary automagic + processing. 1997-10-03 Hrvoje Niksic * prim/faces.el (face-spec-set): Invoke `init-face-from-resources'. * custom/cus-face.el (custom-set-faces): Revert to using - `make-empty-face'. + `make-empty-face'. (custom-declare-face): Ditto. 1997-10-04 SL Baur @@ -19651,14 +21286,14 @@ 1997-10-03 Karl M. Hegbloom * packages/func-menu.el: change the countups from message's to - display-message 'progress's so they don't dump in the lossage - buffer. + display-message 'progress's so they don't dump in the lossage + buffer. 1997-10-03 Karl M. Hegbloom * psgml/psgml.el (sgml-mode-map): Bind (meta backspace) to - 'backward-kill-word so it works as expected. "\e\C-h" will still - do 'sgml-mark-current-element. + 'backward-kill-word so it works as expected. "\e\C-h" will still + do 'sgml-mark-current-element. 1997-08-13 Yves BLUSSEAU @@ -19689,9 +21324,9 @@ 1997-10-02 Hrvoje Niksic * custom/cus-face.el (custom-declare-face): Use `make-face' - instead of `make-empty-face'. + instead of `make-empty-face'. (custom-declare-face): Don't invoke init-face-from-resources - explicitly. + explicitly. * prim/profile.el (pretty-print-profiling-info): When interactive, use a separate buffer instead of current-buffer. @@ -19717,11 +21352,11 @@ to nil. * custom/wid-edit.el (widget-next-button-or-field): Use the - `start-open' flag to `map-extents'. + `start-open' flag to `map-extents'. (widget-previous-button-or-field): Ditto. * custom/cus-edit.el (custom-face-value-create): Use - `face-custom-attributes'. + `face-custom-attributes'. * packages/font-lock.el: Defcustomed some variables. @@ -19741,7 +21376,7 @@ * prim/minibuf.el (input-error): Add a `display-error' property. * custom/cus-face.el (initialize-face-resources): Check for - `make-face-x-resource-internal' before using it. + `make-face-x-resource-internal' before using it. (custom-get-frame-properties): Use `set-frame-property'. 1997-09-29 Hrvoje Niksic @@ -19826,14 +21461,14 @@ 1997-09-28 Karl M. Hegbloom * prim/help.el (find-function-noselect): remove reference to - `path' from the (let* ((path find... since &optional path is no - longer an argument to this function. Cures "Signaling: - (void-variable path)" error when using {M-x find-function}. + `path' from the (let* ((path find... since &optional path is no + longer an argument to this function. Cures "Signaling: + (void-variable path)" error when using {M-x find-function}. 1997-09-27 Karl M. Hegbloom * utils/regexp-opt.el: Add support for the shy grouping "\\(?:" - that came along with the new regexp syntax. + that came along with the new regexp syntax. 1997-09-29 Hrvoje Niksic @@ -19845,9 +21480,9 @@ (widget-color-action): Use `read-color' unconditionally. * utils/edmacro.el: Use append/vconcat instead of mapcar/mapvector - with `identity'. + with `identity'. (format-kbd-macro): Use `indirect-function' instead of - `symbol-function'. + `symbol-function'. (read-kbd-macro): Fix docstring. (edmacro-finish-edit): Use `match-string'. (edmacro-parse-keys): Ditto. @@ -19897,7 +21532,7 @@ (current-input-method, current-input-method-title): Modify DOC-string to sync with Emacs 20.2. - (default-input-method): Use `defcustom' (to sync with Emacs 20.2). + (default-input-method): Use `defcustom' (to sync with Emacs 20.2). (input-method-history): New variable (imported from Emacs 20.2). (inactivate-current-input-method-function): Modify DOC-string to @@ -20020,9 +21655,9 @@ (help-next-symbol): ditto. (help-prev-symbol): ditto. (describe-function): Mention `find-function-function' in - docstring. Use `function-history' in completing-read. + docstring. Use `function-history' in completing-read. (describe-function-1): Only print one filename, even if we know - two! Use `variable-history' in completing-read. + two! Use `variable-history' in completing-read. (where-is): Mention `find-function-function' in docstring. (find-function-function): improve docstring. (find-function-noselect): Remove optional arg. Search also for @@ -20049,13 +21684,13 @@ 1997-09-25 Hrvoje Niksic * custom/wid-edit.el (widget-button-or-field-extent): New - function. + function. (widget-next-button-or-field): Use it. (widget-previous-button-or-field): Ditto. (widget-move): Don't signal an error when there is only one widget - in the buffer. + in the buffer. (widget-push-button-value-create): Cache glyphs themselves, - instead of instantiators. + instead of instantiators. (widget-documentation-string-value-create): Better help echo (widget-mouse-help): Use `functionp'. (widget-echo-help): Ditto. @@ -20074,7 +21709,7 @@ * comint/telnet.el: Minor custom changes. * custom/wid-edit.el (widget-field-action): Edit the value in the - minibuffer. + minibuffer. * custom/cus-edit.el (custom-group-value-create): Renamed `Go to Group' tag to `Open'. @@ -20097,7 +21732,7 @@ the variables. * custom/wid-edit.el (widget-field-keymap): Bind Sh-TAB to - `widget-backward'. + `widget-backward'. (widget-specify-field): Use extents, not overlays. (widget-specify-button): Ditto. (widget-specify-sample): Ditto. @@ -20133,12 +21768,12 @@ events with no bindings. * custom/cus-edit.el (custom-group-value-create): Update members - after loading the widget. + after loading the widget. (custom-group-link-help-echo): New function. (custom-group-link): Use it. * prim/cus-load.el (custom-put): Update - `custom-parent-hash-table'. + `custom-parent-hash-table'. * custom/cus-edit.el (custom-add-parent-links): Use `custom-group-hash-table' to map the groups. @@ -20153,7 +21788,7 @@ (customize-other-window): Ditto. * custom/wid-edit.el (widget-field-keymap): Bind TAB to - `widget-forward'. + `widget-forward'. 1997-09-23 Hrvoje Niksic @@ -20175,7 +21810,7 @@ (custom-group-value-create): Ditto. * custom/wid-edit.el (widget-editable-list-value-get): Revert to - `append'. + `append'. 1997-09-22 Colin Rafferty @@ -20232,12 +21867,12 @@ (custom-unlispify-menu-entry): Use `with-current-buffer'. * custom/wid-edit.el (widget-checklist-match-inline): Revert to - `append'. + `append'. (widget-checklist-value-get): Ditto. (widget-editable-list-match-inline): Ditto. (widget-group-match-inline): Ditto. (widget-glyph-find): Removed compatibility checks; use - `locate-data-directory'. + `locate-data-directory'. (widget-glyph-find): Use backquotes. (widget-push-button-value-create): Ditto. (widget-choice-mouse-down-action): Don't use `window-system'. @@ -20258,7 +21893,7 @@ 1997-09-21 Karl M. Hegbloom * packages/man.el: Got rid of the `stars', and hard coded a prefix - of "Man: " for manual-entry buffers. + of "Man: " for manual-entry buffers. 1997-09-21 Hrvoje Niksic @@ -20281,7 +21916,7 @@ (customize-group-other-window): Alias to `customize-other-window'. * custom/wid-edit.el (widget-choose): Now works with - `widget-menu-minibuffer-flag' set to nil. + `widget-menu-minibuffer-flag' set to nil. (widget-menu-minibuffer-flag): Default to nil. (widget-specify-insert): Use new blackquote syntax. (widget-checklist-value-get): Ditto. @@ -20293,7 +21928,7 @@ (widget-keymap): Bind `M-tab' to `widget-backward'. * prim/help.el (find-function-noselect): `locate-library' is - compression-aware; don't duplicate the work. + compression-aware; don't duplicate the work. * prim/packages.el (packages-hardcoded-lisp): Remove "cl-defs". @@ -20306,14 +21941,14 @@ * custom/wid-edit.el: Removed *lots* of compatibility stuff. * custom/wid-edit.el: (widget-editable-list-value-get): Apply - `nconc' instead of `append'. + `nconc' instead of `append'. * custom/wid-edit.el: Ditto. * custom/cus-edit.el: Ditto. * custom/custom.el: Use `mapc' instead of `mapcar', where - appropriate. + appropriate. * custom/wid-edit.el: Ditto. @@ -20352,10 +21987,10 @@ * utils/reporter.el: Removed mail-user-agent stuff. * x11/x-menubar.el (default-menubar): Use new semantics for - `gnuserv-frame'. + `gnuserv-frame'. * prim/obsolete.el (string-to-sequence): Wouldn't work with TYPE - `vector'. + `vector'. 1997-09-19 Hrvoje Niksic @@ -20414,18 +22049,18 @@ 1997-09-17 Karl M. Hegbloom * ilisp/ilisp-out.el (ilisp-scroll-output): bind `scroll-in-place' - to nil around the call to #'scroll-up so that {C-c v} - will properly scroll the *output* buffer. + to nil around the call to #'scroll-up so that {C-c v} + will properly scroll the *output* buffer. 1997-09-17 Karl M. Hegbloom * ilisp/ilisp-out.el (ilisp-needed-window-height): make window one - line bigger + line bigger 1997-09-15 Karl M. Hegbloom * packages/info.el (Info-mouse-track-double-click-hook): follow - the top menu item when double click in bottom 1/4 and middle 1/3 + the top menu item when double click in bottom 1/4 and middle 1/3 1997-09-16 SL Baur @@ -20521,7 +22156,7 @@ * prim/loadup.el: Use it. * prim/dumped-lisp.el (dumped-lisp-packages): Renamed to - `preloaded-file-list'. + `preloaded-file-list'. * prim/cus-load.el: Updated the comment. @@ -20567,7 +22202,7 @@ Fixup customizations. * packages/emerge.el: Use `with-current-buffer' instead of - `emerge-eval-in-buffer'; reindent. + `emerge-eval-in-buffer'; reindent. * packages/compile.el: Minor customize changes. @@ -20592,7 +22227,7 @@ * modes/strokes.el: Small fixes. (strokes-mode): Don't signal error without window system; issue a - warning. + warning. (strokes-insinuate): New function. Don't defadvice upon loading. (strokes-mode): Use it. (strokes-char-face): Use `defface'. @@ -20615,14 +22250,14 @@ 1997-09-13 Hrvoje Niksic * packages/filladapt.el: Added `:require' to filladapt-mode - customization. + customization. * modes/whitespace-mode.el: Customize better. * modes/hideshow.el: Customize. * packages/icomplete.el: Don't turn on by default; customize - correctly. + correctly. * utils/uniquify.el: Don't invade Emacs by default. (uniquify-buffer-name-style): Default to nil. @@ -20813,7 +22448,7 @@ 1997-08-30 Karl M. Hegbloom * packages/info.el (Info-mouse-track-double-click-hook): Added, - and placed an `add-hook' into (Info-mode) + and placed an `add-hook' into (Info-mode) 1997-08-29 Jens-Ulrik Holger Petersen @@ -20938,19 +22573,19 @@ 1997-08-12 Karl M. Hegbloom * packages/man.el (Manual-mouseify-xrefs): Skip the top line of - manual entries so to not get the all-caps pseudo xrefs in the - heading in our list of manuals. + manual entries so to not get the all-caps pseudo xrefs in the + heading in our list of manuals. (Manual-buffers-have-stars): new customize option. (manual-entry): Fix to utilize the new variable, and to not put - stars around manual names put in the minibuffer history. + stars around manual names put in the minibuffer history. 1997-08-12 Karl M. Hegbloom * packages/info.el (Info-directory-list): reverse the - `Info-default-directory-list' when using it to initialize the - `Info-directory-list'. + `Info-default-directory-list' when using it to initialize the + `Info-directory-list'. (Info-insert-dir): make it so the insertion of a locadir file at a - "^[ \t]*Local.*\n[ \t]*[-=]+" line works correctly. + "^[ \t]*Local.*\n[ \t]*[-=]+" line works correctly. Mon Aug 11 17:35:35 1997 SL Baur @@ -20976,18 +22611,18 @@ 1997-08-09 Karl M. Hegbloom * packages/info.el: (info::toolbar) swap next and prev buttons to - match the order of the node headings in info files. + match the order of the node headings in info files. 1997-08-09 Karl M. Hegbloom * packages/info.el: (Info-fontify-node) will now split top line - that spans 3 lines. (Info-extract-pointer) adjust to match. + that spans 3 lines. (Info-extract-pointer) adjust to match. 1997-08-08 Karl M. Hegbloom * packages/info.el: (Info-extract-pointer) make it move forward - one more line so when the top line has been split, the toolbar - arrows, u, and p will find the link they need. + one more line so when the top line has been split, the toolbar + arrows, u, and p will find the link they need. Thu Aug 7 18:13:12 1997 Barry A. Warsaw @@ -21112,66 +22747,66 @@ * packages/man.el: Several modifications * (manual-entry) buffers are named without *'s, when - `buffers-menu-submenus-for-groups-p' is t, so they show up - in a subsection of the Buffer's menu now, rather than - lumped under *Misc*. + `buffers-menu-submenus-for-groups-p' is t, so they show up + in a subsection of the Buffer's menu now, rather than + lumped under *Misc*. * (Manual-mode) added a local `kill-buffer-hook' to remove - a killed manual from the `Manual-page-history' + a killed manual from the `Manual-page-history' * (Manual-last-page) begun rewrite of manuvering and - viewing mode code + viewing mode code * (Manual-mouseify-xrefs) hyphenated xrefs are highlighted - now, and properly handled when the second line is - indented. They end up on the menus too. + now, and properly handled when the second line is + indented. They end up on the menus too. * (Manual-popup-menu) made the far button popup menus look - better by removing the prefix string and adding a title. + better by removing the prefix string and adding a title. 1997-08-06 Karl M. Hegbloom * packages/info.el: (Info-highlight-region) Fixed it to not - highlight the indention spaces in xrefs split across lines with - indention on the second line. + highlight the indention spaces in xrefs split across lines with + indention on the second line. 1997-08-06 Karl M. Hegbloom * packages/info.el: Numerous modifications, including: * support for "dir" merging 'ala Emacs-19.34, with - fallback to cheap localdir files in the secondary info - directories. + fallback to cheap localdir files in the secondary info + directories. * changed default `Info-annotations-path' from - ~/.infonotes to ~/.xemacs/info.notes + ~/.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' + `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. + 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. + characters and tweaked fontification to handle that. * changed the look of the pop-up mouse menus by utilizing - the "--:etchedThing" dividers. + the "--:etchedThing" dividers. * several docstring reformats and typo fixes, a few - comments deleted. + comments deleted. * info/dir: deleted the Locals: line. I think it's obsolete since - the "dir" merge can put things from like-named nodes in separated - "dir" files all under one menu, which is more versatile than just - a "Locals:" section. If you still want a "Locals:" section, make - yourself a node for it. + the "dir" merge can put things from like-named nodes in separated + "dir" files all under one menu, which is more versatile than just + a "Locals:" section. If you still want a "Locals:" section, make + yourself a node for it. 1997-08-07 SL Baur @@ -21185,9 +22820,9 @@ 1997-08-01 Karl M. Hegbloom - * efs/dired.el (dired-get-filename) Move the skipping of the - ending carriage return on NT to inside the setq so `and' won't - fail on Unix. + * efs/dired.el (dired-get-filename) Move the skipping of the + ending carriage return on NT to inside the setq so `and' won't + fail on Unix. 1997-07-30 SL Baur @@ -21222,7 +22857,7 @@ void foo() { static struct Pattern nums - = {1, 2, 3}; + = {1, 2, 3}; int j = 2; } @@ -21274,7 +22909,7 @@ 1997-07-23 Karl M. Hegbloom * packages/info.el: (Info-fontify-node) Allow colons in menu - names. There must be whitespace following the menu ending colon. + names. There must be whitespace following the menu ending colon. 1997-07-23 SL Baur @@ -21290,7 +22925,7 @@ 1997-07-22 SL Baur * x11/x-toolbar.el (toolbar-paste-function): Add default as - option. + option. * prim/minibuf.el (force-dialog-box-use): Fix typo. From Pekka Marjola @@ -21303,7 +22938,7 @@ 1997-07-21 Karl M. Hegbloom * prim/minibuf.el: New customize variable: - `minibuffer-history-uniquify' + `minibuffer-history-uniquify' (read-from-minibuffer) Only remove histval from list if minibuffer-history-uniquify is t. @@ -21449,7 +23084,7 @@ 1997-07-14 Hrvoje Niksic * packages/pending-del.el (pending-delete-modeline-string): New - option. + option. 1997-07-14 Steven L Baur @@ -21467,25 +23102,25 @@ 1997-07-13 Karl M. Hegbloom * prim/minibuf.el: (read-from-minibuffer) Corrected indentation, - History lists don't contain dups anymore, newest is put on top and - removed from the cdr. + History lists don't contain dups anymore, newest is put on top and + removed from the cdr. 1997-07-13 Karl M. Hegbloom * packages/man.el: (manual-entry) Added `Manual-page- - minibuffer-history', and added it to the read-string statement. - Added #\: to `fmh' so that manuals named like MIME::Parser(3) are - found at point. + minibuffer-history', and added it to the read-string statement. + Added #\: to `fmh' so that manuals named like MIME::Parser(3) are + found at point. (Manual-mouseify-xrefs) Fixed it so now it will mousify the manual - entry on the first line of an apropos listing. + entry on the first line of an apropos listing. 1997-07-10 Karl M. Hegbloom * packages/info.el: Added `Info-minibuffer-history', and made it - the minibuffer history variable in the `completing-read' calls. + the minibuffer history variable in the `completing-read' calls. * utils/savehist.el: Added `Info-minibuffer-history' to default - value of `savehist-history-variables'. + value of `savehist-history-variables'. 1997-07-13 Steven L Baur @@ -21495,7 +23130,7 @@ 1997-07-11 Hrvoje Niksic * prim/cmdloop.el (execute-extended-command): Use - `sorted-key-descriptions'. + `sorted-key-descriptions'. * prim/help.el (sorted-key-descriptions): New function. (where-is): Use it. @@ -21601,7 +23236,7 @@ 1997-07-10 Hrvoje Niksic * packages/pending-del.el (pending-delete-pre-hook): Don't quote - lambda. + lambda. (pending-delete-pre-hook): Use `error-message-string'. (pending-delete): Treat as minor mode; define the standard turn-on and turn-off functions. @@ -21945,7 +23580,7 @@ From Gary D. Foster * mel/mel-q.el (q-encoding-encode-string): Fix Ebola-ified - comparison. + comparison. * efs/efs-ovwrt.el (efs-overwrite-fn): efs is manufacturing its own byte code. Whee. @@ -21977,7 +23612,7 @@ 1997-06-28 Hrvoje Niksic * modes/abbrev.el (define-abbrev): If NAME contains a non-word - character, intern a ` ' symbol in the obarray. + character, intern a ` ' symbol in the obarray. 1997-06-29 Steven L Baur @@ -22204,7 +23839,7 @@ 1997-06-24 Hrvoje Niksic * prim/cmdloop.el: Customize `teach-extended-commands-p' and - `teach-extended-commands-timeout'. + `teach-extended-commands-timeout'. 1997-06-23 Steven L Baur @@ -22466,7 +24101,7 @@ * prim/packages.el: New file. * prim/update-elc.el: Determine location and count of - auto-autoloads files at run-time. + auto-autoloads files at run-time. * prim/loaddefs.el (((dir load-path))): Generalize load of auto-autoloads. @@ -22545,8 +24180,8 @@ * edebug/edebug.el: Register with-current-buffer and others. * modes/lisp-mode.el: Added specs for save-current-buffer, - with-output-to-string, with-current-buffer, with-temp-file and - with-output-to-temp-buffer. + with-output-to-string, with-current-buffer, with-temp-file and + with-output-to-temp-buffer. 1997-06-13 MORIOKA Tomohiko @@ -22758,7 +24393,7 @@ * x11/x-menubar.el (default-menubar): Add menu for Mule. * mule/mule-cmds.el: Menu for XEmacs were moved to - x11/x-menubar.el. + x11/x-menubar.el. 1997-06-03 MORIOKA Tomohiko @@ -22781,21 +24416,21 @@ * leim/quail.el: to sync with quail.el of Emacs-19.34.94-epsilon. * leim/quail/ziranma.el, leim/quail/tonepy.el, leim/quail/py.el, - leim/quail/qj.el, leim/quail/sw.el, leim/quail/ccdospy.el, - leim/quail/punct.el, leim/quail/4corner.el, - leim/quail/symbol-ksc.el, leim/quail/ethiopic.el, - leim/quail/hanja.el, leim/quail/quick-cns.el, - leim/quail/tsangchi-cns.el, leim/quail/lrt.el, - leim/quail/tsangchi-b5.el, leim/quail/devanagari.el, - leim/quail/japanese.el, leim/quail/quick-b5.el, - leim/quail/punct-b5.el, leim/quail/qj-b5.el, leim/quail/py-b5.el, - leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/ecdict.el, - leim/quail/array30.el, leim/quail/hangul3.el, - leim/quail/hanja-jis.el, leim/quail/cyrillic.el, - leim/quail/etzy.el, leim/quail/greek.el, leim/quail/ipa.el, - leim/quail/lao.el, leim/quail/zozy.el, leim/quail/viqr.el, - leim/quail/latin.el, leim/quail/thai.el, leim/quail/hangul.el: - quail of LEIM for Emacs-19.34.94-epsilon. + leim/quail/qj.el, leim/quail/sw.el, leim/quail/ccdospy.el, + leim/quail/punct.el, leim/quail/4corner.el, + leim/quail/symbol-ksc.el, leim/quail/ethiopic.el, + leim/quail/hanja.el, leim/quail/quick-cns.el, + leim/quail/tsangchi-cns.el, leim/quail/lrt.el, + leim/quail/tsangchi-b5.el, leim/quail/devanagari.el, + leim/quail/japanese.el, leim/quail/quick-b5.el, + leim/quail/punct-b5.el, leim/quail/qj-b5.el, leim/quail/py-b5.el, + leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/ecdict.el, + leim/quail/array30.el, leim/quail/hangul3.el, + leim/quail/hanja-jis.el, leim/quail/cyrillic.el, + leim/quail/etzy.el, leim/quail/greek.el, leim/quail/ipa.el, + leim/quail/lao.el, leim/quail/zozy.el, leim/quail/viqr.el, + leim/quail/latin.el, leim/quail/thai.el, leim/quail/hangul.el: + quail of LEIM for Emacs-19.34.94-epsilon. 1997-06-04 Steven L Baur @@ -22895,7 +24530,7 @@ 1997-06-01 MORIOKA Tomohiko * tm/gnus-mime-old.el was abolished because XEmacs 20.3 has Gnus - 5.4. + 5.4. * tm/tm-edit.el: updated to 7.108. @@ -22909,19 +24544,19 @@ * mule/european.el was abolished because it seems not to be used. * mule/mule-load.el: must load mule-cmds before setting for - language-environment. + language-environment. * mule/mule-cmds.el, lisp/mule/european-hooks.el: Modified for LEIM. * mule/mule-cmds.el: Uncomment key definition for - `toggle-input-method'. + `toggle-input-method'. * mule/mule-init.el: Comment out about `mule-keymap' (moved to - mule-cmds.el). + mule-cmds.el). * mule/mule-cmds.el: Uncomment about `mule-keymap' (moved from - mule-init.el). + mule-init.el). * tl/tl-atype.el: Don't require tl-str. @@ -22939,26 +24574,26 @@ * mu/std11-parse.el, mu/std11.el: moved to lisp/apel/. * leim/quail.el: Add new quail.el (imported from Emacs - 19.34.94-epsilon). + 19.34.94-epsilon). * leim/skk/skkdic.el: delete skkdic.el temporary because XEmacs - can not compile it. + can not compile it. * leim/skk/skkdic.el, leim/quail/zozy.el, leim/quail/ziranma.el, - leim/quail/viqr.el, leim/quail/tsangchi-cns.el, - leim/quail/tsangchi-b5.el, leim/quail/symbol-ksc.el, - leim/quail/thai.el, leim/quail/tonepy.el, leim/quail/quick-cns.el, - leim/quail/sw.el, leim/quail/qj-b5.el, leim/quail/qj.el, - leim/quail/quick-b5.el, leim/quail/py-b5.el, leim/quail/py.el, - leim/quail/lao.el, leim/quail/latin.el, leim/quail/lrt.el, - leim/quail/punct-b5.el, leim/quail/punct.el, - leim/quail/hanja-jis.el, leim/quail/hanja.el, leim/quail/ipa.el, - leim/quail/japanese.el, leim/quail/hangul3.el, leim/quail/etzy.el, - leim/quail/greek.el, leim/quail/hangul.el, leim/quail/ethiopic.el, - leim/quail/devanagari.el, leim/quail/ecdict.el, - leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/cyrillic.el, - leim/quail/array30.el, leim/quail/ccdospy.el, - leim/quail/4corner.el: Add LEIM elisp files. + leim/quail/viqr.el, leim/quail/tsangchi-cns.el, + leim/quail/tsangchi-b5.el, leim/quail/symbol-ksc.el, + leim/quail/thai.el, leim/quail/tonepy.el, leim/quail/quick-cns.el, + leim/quail/sw.el, leim/quail/qj-b5.el, leim/quail/qj.el, + leim/quail/quick-b5.el, leim/quail/py-b5.el, leim/quail/py.el, + leim/quail/lao.el, leim/quail/latin.el, leim/quail/lrt.el, + leim/quail/punct-b5.el, leim/quail/punct.el, + leim/quail/hanja-jis.el, leim/quail/hanja.el, leim/quail/ipa.el, + leim/quail/japanese.el, leim/quail/hangul3.el, leim/quail/etzy.el, + leim/quail/greek.el, leim/quail/hangul.el, leim/quail/ethiopic.el, + leim/quail/devanagari.el, leim/quail/ecdict.el, + leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/cyrillic.el, + leim/quail/array30.el, leim/quail/ccdospy.el, + leim/quail/4corner.el: Add LEIM elisp files. * mule/mule-load.el, mule/mule-cmds.el: Add mule-cmds.el. @@ -22994,11 +24629,11 @@ * Updated my email address - klm@python.org instead of klm@nist.gov. * Icomplete no longer installs itself when you load the package - - you have to invoke `icomplete-mode'. (Since it's autoloaded in + you have to invoke `icomplete-mode'. (Since it's autoloaded in both emacs, you can just invoke the function.) * Integrated Emacs 19.34 and XEmacs 19.15 corrections (typos, - style, command revisions, etc). + style, command revisions, etc). * Integrated immediate keybindings display. See `icomplete-show-key-bindings', `icomplete-get-keys', and @@ -23007,7 +24642,7 @@ * `icomplete-get-keys': Return keys bound in prior buffer to func name. * Added icomplete delay behavior, so completions don't intrude as - quickly for short input, with customization variables: + quickly for short input, with customization variables: `icomplete-max-delay-chars' - Maximum number of initial chars to apply icomplete compute delay. @@ -23238,7 +24873,7 @@ Mon Sep 25 17:19:51 1995 Per Bothner * eterm/term.el (term-emulate-terminal): On CR, set - term-current-column to term-start-line-column, not 0. + term-current-column to term-start-line-column, not 0. 1997-05-21 Steven L Baur @@ -23932,20 +25567,20 @@ Fri Jul 19 12:01:51 1996 Christoph Wedler * packages/hyper-apropos.el: Massive changes--the original knew nothing - about buffer-locals and local-bindings. + about buffer-locals and local-bindings. (hypropos-shrink-window): New user option. (hypropos-ref-buffer): New variable. (hypropos-regexp-history): New variable. (hyper-apropos): Better interactive version. (hypropos-grok-variables): Omit OBSOLETE stuff. (hyper-describe-variable): Additional ARG, better interactive - version. + version. (hyper-describe-function): Ditto. (hypropos-last-help): Without prefix arg, just display buffer. (hypropos-insert-face): New function. (hypropos-insert-keybinding): New function. (hypropos-get-doc): Additional ARG, display documentation for - faces, complete change. + faces, complete change. (hypropos-this-symbol): Using better regexp. Fri Mar 7 10:44:48 1997 Steven L Baur @@ -23969,7 +25604,7 @@ Tue Mar 4 01:19:37 1997 Hrvoje Niksic * edebug/edebug.el (edebug-compute-previous-result): Don't treat - numbers as chars. + numbers as chars. Wed Mar 5 10:11:55 1997 Steven L Baur @@ -24076,12 +25711,12 @@ Fri Feb 28 22:17:03 1997 Hrvoje Niksic * prim/isearch-mode.el: Added "_" to the `interactive' forms of - most functions. + most functions. (isearch-mode-map): Define M-y. (isearch-yank-kill): New function. * prim/keydefs.el: Don't bind `C-x C-n' to `set-goal-column'; - don't disable `set-goal-column'. + don't disable `set-goal-column'. * mule/mule-init.el (ctl-x-map): Use `C-x C-n' as mule-prefix, instead of `C-x C-k'. @@ -24184,7 +25819,7 @@ * utils/eldoc.el (eldoc-function-argstring-from-docstring-method-table): Forge - docstrings for `and', `or', `list', `+', and `-'. + docstrings for `and', `or', `list', `+', and `-'. * utils/eldoc.el (eldoc-add-command-completions): New function. (eldoc-add-command): Take list of args. @@ -24268,12 +25903,12 @@ Mon Feb 17 02:01:27 1997 Hrvoje Niksic * utils/edmacro.el (edmacro-format-keys): Would bug out on empty - macro. + macro. Mon Feb 17 02:01:27 1997 Hrvoje Niksic * utils/edmacro.el (edmacro-format-keys): Would bug out on empty - macro. + macro. (edmacro-fix-menu-commands): Would bug out on 'control, etc. (edmacro-events-to-keys): New function. (edmacro-format-keys): Use it. @@ -24508,8 +26143,8 @@ Thu Jan 30 20:33:56 1997 Hvoje Niksic * x11/x-toolbar.el - (toolbar-open,toolbar-dired,toolbar-save,toolbar-print,toolbar-cut,toolbar-copy,toolbar-paste,toolbar-undo,toolbar-replace): - New functions. + (toolbar-open,toolbar-dired,toolbar-save,toolbar-print,toolbar-cut,toolbar-copy,toolbar-paste,toolbar-undo,toolbar-replace): + New functions. (toolbar-news): Allow running without separate frame. (toolbar-mail-commands-alist): New variable. (toolbar-mail-reader): Ditto. @@ -24733,8 +26368,8 @@ Fri Jan 3 16:20:42 1997 Steven L Baur * gnus/gnus-setup.el: Updated to gracefully handle installed - auxilliary packages like tm, and handle eventual integration of - Red Gnus/Gnus 5.4. + auxilliary packages like tm, and handle eventual integration of + Red Gnus/Gnus 5.4. Fri Jan 3 14:32:07 1997 Vinnie Shelton @@ -24800,7 +26435,7 @@ * psgml-other.el (sgml-set-face-for): Nullify {after,before}-change-functions as well as (obsolete) - {after,before}-change-function. + {after,before}-change-function. Tue Dec 31 11:34:37 1996 Steven L Baur @@ -25236,7 +26871,7 @@ Thu Dec 5 12:09:19 1996 Lars Magne Ingebrigtsen * prim/replace.el (match-string): Use a function instead of a - macro to be compatible with .elc files compiled under Emacs. + macro to be compatible with .elc files compiled under Emacs. Thu Dec 5 09:50:12 1996 Bob Weiner @@ -25251,9 +26886,9 @@ Thu Dec 5 00:15:59 1996 Steven L Baur * prim/help.el: A callable library-type function should not - contain an unprotected print statement. This change implements my - version of Erik Naggum's statement about locate-library being less - chatty in Emacs 19.35. + contain an unprotected print statement. This change implements my + version of Erik Naggum's statement about locate-library being less + chatty in Emacs 19.35. Wed Dec 4 22:00:49 1996 Steven L Baur @@ -25292,7 +26927,7 @@ * edebug/cl-specs.el: Comment formatting changes. * edebug/cl-read.el: Protect advisement of eval-region from being - evaluated more than once. + evaluated more than once. Comment formatting changes. @@ -25306,15 +26941,15 @@ * 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 + face, apropos bombs with an error Do a (provide 'apropos), like all packages should. Provides an apropos-mode-hook for Apropos Mode buffers (otherwise - customization is unnecessarily painful). + customization is unnecessarily painful). 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). + come out in color by default (defaults are based on various + standard font-lock faces). * version.el: Bumped up to b31. diff -r 71bf2c5667ba -r 66411359ce4e lisp/abbrev.el --- a/lisp/abbrev.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/abbrev.el Sat Oct 25 21:40:46 2008 +0900 @@ -421,8 +421,11 @@ (defun write-abbrev-file (file) "Write all abbrev definitions to a file of Lisp code. +This does not include system abbrevs; it includes only the abbrev tables +listed in listed in `abbrev-table-name-list'. The file written can be loaded in another session to define the same abbrevs. -The argument FILE is the file name to write." +The argument FILE is the file name to write. If omitted or nil, the file +specified in `abbrev-file-name' is used." (interactive (list (read-file-name "Write abbrev file: " @@ -430,15 +433,19 @@ abbrev-file-name))) (or (and file (> (length file) 0)) (setq file abbrev-file-name)) - (save-excursion - (set-buffer (get-buffer-create " write-abbrev-file")) - (erase-buffer) - (let ((tables abbrev-table-name-list)) - (while tables - (insert-abbrev-table-description (car tables) nil) - (setq tables (cdr tables)))) - (write-region 1 (point-max) file) - (erase-buffer))) + (let ((coding-system-for-write 'escape-quoted)) + (with-temp-file file + ;; XEmacs change; not emacs-mule, and use the coding system + ;; escape-quoted resolves to, which will differ depending on whether + ;; the build is Mule or not. + (insert (format ";;-*-coding: %s;-*-\n" + (coding-system-name + (find-coding-system coding-system-for-write)))) + (dolist (table + ;; XEmacs change; we keep the table sorted at runtime, no + ;; need to sort it here. + abbrev-table-name-list) + (insert-abbrev-table-description table nil))))) (defun abbrev-string-to-be-defined (arg) "Return the string for which an abbrev will be defined. @@ -582,9 +589,9 @@ (<= (setq pnt (point)) (- (point-max) lim)))) (if (abbrev-expansion (setq string - (buffer-substring - (save-excursion (backward-word) (point)) - pnt))) + (downcase (buffer-substring + (save-excursion (backward-word) (point)) + pnt)))) (if (or noquery (y-or-n-p (format "Expand `%s'? " string))) (expand-abbrev))))))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/about.el --- a/lisp/about.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/about.el Sat Oct 25 21:40:46 2008 +0900 @@ -113,7 +113,7 @@ (devin "Matthieu Devin" "devin@xemacs.org") (dkindred "Darrell Kindred" "dkindred@xemacs.org") (dmoore "David Moore" "dmoore@xemacs.org") - (dv "Didier Verna" "didier@xemacs.org") + (didier "Didier Verna" "didier@xemacs.org") (eb "Eric Benson" "eb@xemacs.org") (fabrice "Fabrice Popineau" "fabrice@xemacs.org") (golubev "Ilya Golubev" "golubev@xemacs.org") @@ -178,9 +178,9 @@ (defvar about-other-current-hackers ;; to sort this list or the one below, use: ;; M-x sort-regexp-fields RET [a-z]+ RET \(.*\) RET - '(ben daiki darrylo dv fabrice golubev hniksic jan jason jmiller jonathan - kazz kirill larsi martin morioka mta ograf olivier oscar rossini pittman - scop tomonori tuck wmperry yoshiki)) + '(ben daiki darrylo didier fabrice golubev hniksic jan jason jmiller + jonathan kazz kirill larsi martin morioka mta ograf olivier oscar rossini + pittman scop tomonori tuck wmperry yoshiki)) (defvar about-once-and-future-hackers '(aj ajc alastair baw bw cgw chr craig cthomp dan devin dkindred dmoore eb @@ -204,7 +204,8 @@ (daiki . "http://deisui.bug.org/diary/servlet/view") (dkindred . "http://www.cs.cmu.edu/People/dkindred/me.html") (dmoore . "http://oj.egbt.org/dmoore/") - (dv . "http://www.lrde.epita.fr/~didier/") + (didier . "http://didier.lrde.org/") + (dvljazz . "http://www.didierverna.com/") (fabrice . "http://www.ese-metz.fr/~popineau/") (fptex . "http://www.fptex.org/") (james . "http://www.cs.usu.edu/~jerry/") @@ -831,8 +832,8 @@ to think of that killer product... See also ") - (about-url-link 'alastair nil "Visit Alastair's home page") - (widget-insert ".\n")) + (about-url-link 'alastair nil "Visit Alastair's home page") + (widget-insert ".\n")) (baw (widget-insert "\ As of November 2000, I am a software engineer with the Pythonlabs at @@ -855,39 +856,39 @@ Milk Me Daddy (C) 1990 Warsaw =============== - Oh daddy with your fingers pink - From whose udders do you drink? - Thy milk offends with putrid stink - I'll vomit now, lactose I think + Oh daddy with your fingers pink + From whose udders do you drink? + Thy milk offends with putrid stink + I'll vomit now, lactose I think - If I could dream, I'd be a cow - Not horse, or mule, or barnyard sow - The cud I'd chew would drip and how! - So milk me daddy, milk me now! + If I could dream, I'd be a cow + Not horse, or mule, or barnyard sow + The cud I'd chew would drip and how! + So milk me daddy, milk me now! - My bovine nature knows no bounds - I'd naught awake at midnight sounds - Of teens approaching o'er the grounds - To tip with glee, then screech like clowns + My bovine nature knows no bounds + I'd naught awake at midnight sounds + Of teens approaching o'er the grounds + To tip with glee, then screech like clowns - And so I stare into this glass - Of sweaty juice, I gulp so fast - Each drop I lick, down to the last - The vertigo I know will pass + And so I stare into this glass + Of sweaty juice, I gulp so fast + Each drop I lick, down to the last + The vertigo I know will pass - My mother smiles and pats my head - She's proud of me, so she has said - My pop just now gets out of bed - His eyes quite comatose and red + My mother smiles and pats my head + She's proud of me, so she has said + My pop just now gets out of bed + His eyes quite comatose and red - He'll empathize my milky fate - Whilest sopping gravy from his plate - And as the hour is getting late - His belly taut with all he ate + He'll empathize my milky fate + Whilest sopping gravy from his plate + And as the hour is getting late + His belly taut with all he ate - He isn't often quite so chatty - His arteries clogged with meat so fatty - With burps that launch soup, thick and splatty + He isn't often quite so chatty + His arteries clogged with meat so fatty + With burps that launch soup, thick and splatty Oh how I wish you'd milk me daddy\n\n\t") (about-url-link 'baw nil "Visit Barry's home page") (widget-insert "\n")) @@ -979,24 +980,30 @@ He has a page at ") (about-url-link 'dmoore nil "Visit David's home page") (widget-insert ".\n")) - (dv + (didier (widget-insert "\ -I graduated at ENST (an engineering school in Paris) and have a Ph.D. -in computer science. I'm currently a teacher at EPITA (another -engineering school, still in Paris) and a researcher at LRDE (EPITA's -research and development laboratory). Our research topics include -generic programming and distributed virtual reality. +Didier has a Ph.D. in Computer Science and is currently working as an +assistant professor for an engineering school in Paris). He gives +lectures on Operating Systems, Computer Graphics, Functional Programming +and Typesetting. His research interests include Genericity, Object +Orientation and Functional Programming, all in one language: + +... Common Lisp. + -Apart from XEmacs, I'm also involved in other free software projects, -including Gnus, BBDB, and the GNU \"autotools\". I also wrote some -LaTeX packages (ugh :-). +Apart from the world of XEmacs and Emacs Lisp, Didier is also the author +of several LaTeX packages (FiNK, FiXme, QCM and CurVe) and an occasional +contributor to other Free Software projects (the GNU Autotools most +notably; he was one of the technical reviewers for the \"Goat Book\"). -All of this, actually, is only 60% true. Two days per week, I'm also a -semi-professional Jazz guitar player (and singer), which means that it -is not the way I earn my crust, but things may very well reverse in -the future ...\n\n") - (widget-insert "Visit Didier's home page: ") - (about-url-link 'dv nil "Visit Didier's home page") +But all of this is only 60% true... Two days per week, Didier is indeed +a semi-professional Jazz guitar player (and singer), which means that he +doesn't quite earn his crust with it, but things may very well reverse in +the future...\n") + (widget-insert "\nVisit Didier's scientific website: ") + (about-url-link 'didier nil "Visit Didier's scientific website") + (widget-insert "\nVisit Didier's musical website: ") + (about-url-link 'dvljazz nil "Visit Didier's musical website") (widget-insert "\n")) (eb (widget-insert @@ -1345,7 +1352,7 @@ spent some time in DevPro (that is when I made my contribution to XEmacs) and joined JavaSoft in fall '95, where I've been the lead for several JSP-related specifications and JAX-RPC. I'm currently the Web -Layer architect for J2EE. +Layer architect for J2EE. I was born in Barcelona and I grew up mostly in Caracas; I have two kids and I speak only catalan to them; I can juggle some (career, family, and @@ -1447,11 +1454,11 @@ circuits with special emphasis on distributed software concepts. He has now joined HP as technical consultant. - All of the buildings, - all of the cars - were once just a dream - in somebody's head.\n - P. Gabriel\n")) + All of the buildings, + all of the cars + were once just a dream + in somebody's head.\n + P. Gabriel\n")) (tomonori (widget-insert "\ @@ -1469,19 +1476,16 @@ learned to actually code. Well, they also serve who rail 'n' rant. - ") + ") (about-url-link 'turnbull nil "Visit Steve's personal page") (widget-insert "\n")) (vin (widget-insert "\ -I own and operate my own consulting firm, EtherSoft. Shhh, don't -tell anyone, but it's named after an Ultimate team I used to play -with in Austin, Texas - the Ether Bunnies. I'm getting too old -to play competitive Ultimate any more, so now I've gotten roped -into serving on the board of directors of the Ultimate Players -Association. See ") - (about-url-link 'vin nil "Visit the UPA homepage") - (widget-insert ".\n")) +I'm a software engineer and manager for Adaptive Optics Associates in +Cambridge, Massachusetts. I used to play a lot of Ultimate (see\n") + (about-url-link 'vin nil "Visit the Ultimate Players Association homepage") + (widget-insert " for more details), but nowadays I'm a family man, +so I spend a lot of time with my wife, Becky, and our son, Noah.\n")) (viteno (widget-insert "\ @@ -1615,23 +1619,22 @@ (dkindred (widget-insert "\ Darrell tends to come out of the woodwork a couple of weeks -before a new release with a flurry of fixes for bugs that +before a new release with a flurry of fixes for bugs that annoy him. He hopes he's spared you from a core dump or two.\n")) (dmoore (widget-insert "\ David has contributed greatly to the quest to speed up XEmacs.\n")) - (dv + (didier (widget-insert "\ -I joined the development of XEmacs in 1996, and have been one of the -core maintainers since 1998. Although I'm mostly interested in the -GUI, ergonomics, redisplay and autoconf issues, it's probably simpler -to describe what I'm *not* involved in: I've never touched the Lisp -implementation, and I probably never will... +Didier joined the development of XEmacs in 1996, and has been one of +the core maintainers since 1998. His very first contribution was the +translation of the tutorial to French. Since then, he has contributed +various bug fixes and enhancements in fields as diverse as the GUI, +redisplay engine and autoconf support. -I'm the author of the multicast support, I wrote and maintain some -external Emacs Lisp packages (including mchat) and I'm also -responsible for some of the core Lisp code (including the rectangle -library which I rewrote for both XEmacs and GNU Emacs).\n")) +Didier is the official maintainer of some core libraries (rect, cus-edit, +wid-edit) and the author of the multicast support. He is also the author +of several packages, including mchat and Patcher.\n")) (eb (widget-insert "\ Also part of the original Lucid Emacs development team. Eric played a @@ -1657,7 +1660,7 @@ (gunnar (widget-insert "\ -Sorry, no information about my XEmacs contributions yet.\n")) +Sorry, no information about my XEmacs contributions yet.\n")) (hbs (widget-insert "\ Part of the original (pre-19.0) Lucid Emacs development team. Harlan @@ -1906,12 +1909,11 @@ and has contributed quite a bit of documentation, especially for Mule.\n")) (vin (widget-insert "\ -Vin helps maintain the older, more mature (read: moldy) versions of -XEmacs. Vin maintains the XEmacs patch pages in order to bring a more -stable XEmacs. (Actually, he does it 'cause it's fun and he's been -using emacs for a long, long time.) Vin also contributed the detached -minibuffer code as well as a few minor enhancements to the menubar -options.\n")) +Vin maintains the stable version of XEmacs. This involves reviewing +a lot of other peoples' patches and testing and applying them. +He also gets to generate his own patches from time to time. Being +release manager is a fun way to contribute to the XEmacs project. +Write me at acs@xemacs.org if you're interested in learning more.\n")) (viteno (widget-insert "\ diff -r 71bf2c5667ba -r 66411359ce4e lisp/autoload.el --- a/lisp/autoload.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/autoload.el Sat Oct 25 21:40:46 2008 +0900 @@ -226,6 +226,41 @@ ;; Parsing the source file text. ;; Autoloads in C source differ from those in Lisp source. +; Add operator definitions to autoload-operators.el in the xemacs-base +; package. +(ignore-errors (require 'autoload-operators)) + +; As autoload-operators is new, provide stopgap measure for a while. +(if (not (boundp 'autoload-make-autoload-operators)) + (progn + (defvar autoload-make-autoload-operators + '(defun define-skeleton defmacro define-derived-mode define-generic-mode + easy-mmode-define-minor-mode easy-mmode-define-global-mode + define-minor-mode defun* defmacro*) + "`defun'-like operators that use `autoload' to load the library.") + + (defvar autoload-make-autoload-complex-operators + '(easy-mmode-define-minor-mode easy-mmode-define-global-mode + define-minor-mode) + "`defun'-like operators to macroexpand before using `autoload'.") + + (put 'autoload 'doc-string-elt 3) + (put 'defun 'doc-string-elt 3) + (put 'defun* 'doc-string-elt 3) + (put 'defvar 'doc-string-elt 3) + (put 'defcustom 'doc-string-elt 3) + (put 'defconst 'doc-string-elt 3) + (put 'defmacro 'doc-string-elt 3) + (put 'defmacro* 'doc-string-elt 3) + (put 'defsubst 'doc-string-elt 3) + (put 'define-skeleton 'doc-string-elt 2) + (put 'define-derived-mode 'doc-string-elt 4) + (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) + (put 'define-minor-mode 'doc-string-elt 2) + (put 'define-generic-mode 'doc-string-elt 7) + ;; defin-global-mode has no explicit docstring. + (put 'easy-mmode-define-global-mode 'doc-string-elt 1000))) + (defun make-autoload (form file) "Turn FORM into an autoload or defvar for source file FILE. Returns nil if FORM is not a special autoload form (i.e. a function definition @@ -233,8 +268,7 @@ (let ((car (car-safe form)) expand) (cond ;; For complex cases, try again on the macro-expansion. - ((and (memq car '(easy-mmode-define-global-mode - easy-mmode-define-minor-mode define-minor-mode)) + ((and (memq car autoload-make-autoload-complex-operators) (setq expand (let ((load-file-name file)) (macroexpand form))) (eq (car expand) 'progn) (memq :autoload-end expand)) @@ -246,10 +280,7 @@ (cdr expand))))) ;; For special function-like operators, use the `autoload' function. - ((memq car '(defun define-skeleton defmacro define-derived-mode - define-generic-mode easy-mmode-define-minor-mode - easy-mmode-define-global-mode - define-minor-mode defun* defmacro*)) + ((memq car autoload-make-autoload-operators) (let* ((macrop (memq car '(defmacro defmacro*))) (name (nth 1 form)) (body (nthcdr (get car 'doc-string-elt) form)) @@ -279,7 +310,9 @@ ',varname 'custom-variable) (custom-add-load ',varname ,(plist-get rest :require)))))) - + ;; Coding systems. #### Would be nice to handle the docstring here too. + ((memq car '(make-coding-system make-8-bit-coding-system)) + `(autoload-coding-system ,(nth 1 form) '(load ,file))) ;; nil here indicates that this is not a special autoload form. (t nil)))) @@ -513,7 +546,8 @@ (let ((begin (point))) (forward-sexp) (forward-line 1) - (princ (buffer-substring begin (point)) outbuf))) + (princ (buffer-substring begin (point)) outbuf)) + (setq autoloads-done (cons ' autoloads-done))) (t (princ (buffer-substring (progn @@ -767,41 +801,6 @@ (insert "\\^L"))) (goto-char p2)))))))) -;;; Forms which have doc-strings which should be printed specially. -;;; A doc-string-elt property of ELT says that (nth ELT FORM) is -;;; the doc-string in FORM. -;;; -;;; There used to be the following note here: -;;; ;;; Note: defconst and defvar should NOT be marked in this way. -;;; ;;; We don't want to produce defconsts and defvars that -;;; ;;; make-docfile can grok, because then it would grok them twice, -;;; ;;; once in foo.el (where they are given with ;;;###autoload) and -;;; ;;; once in loaddefs.el. -;;; -;;; Counter-note: Yes, they should be marked in this way. -;;; make-docfile only processes those files that are loaded into the -;;; dumped Emacs, and those files should never have anything -;;; autoloaded here. The above-feared problem only occurs with files -;;; which have autoloaded entries *and* are processed by make-docfile; -;;; there should be no such files. - -(put 'autoload 'doc-string-elt 3) -(put 'defun 'doc-string-elt 3) -(put 'defun* 'doc-string-elt 3) -(put 'defvar 'doc-string-elt 3) -(put 'defcustom 'doc-string-elt 3) -(put 'defconst 'doc-string-elt 3) -(put 'defmacro 'doc-string-elt 3) -(put 'defmacro* 'doc-string-elt 3) -(put 'defsubst 'doc-string-elt 3) -(put 'define-skeleton 'doc-string-elt 2) -(put 'define-derived-mode 'doc-string-elt 4) -(put 'easy-mmode-define-minor-mode 'doc-string-elt 2) -(put 'define-minor-mode 'doc-string-elt 2) -(put 'define-generic-mode 'doc-string-elt 7) -;; defin-global-mode has no explicit docstring. -(put 'easy-mmode-define-global-mode 'doc-string-elt 1000) - (defun autoload-trim-file-name (file) "Returns relative pathname of FILE including the last directory. diff -r 71bf2c5667ba -r 66411359ce4e lisp/behavior.el --- a/lisp/behavior.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/behavior.el Sat Oct 25 21:40:46 2008 +0900 @@ -478,23 +478,23 @@ (defun behavior-menu-filter (menu) (append - '(("%_Package Utilities" + `(("%_Package Utilities" ("%_Set Download Site" ("%_Official Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-download-menu))))) + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-download-menu))))) ("%_Pre-Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-pre-release-download-menu))))) + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-pre-release-download-menu))))) ("%_Site Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-site-release-download-menu)))))) + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-site-release-download-menu)))))) "--:shadowEtchedIn" ["%_Update Package Index" package-get-update-base] ["%_List and Install" pui-list-packages] diff -r 71bf2c5667ba -r 66411359ce4e lisp/build-report.el --- a/lisp/build-report.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/build-report.el Sat Oct 25 21:40:46 2008 +0900 @@ -3,8 +3,8 @@ ;; Copyright (C) 1997-2003 Adrian Aichner ;; Author: Adrian Aichner -;; Date: $Date: 2005/10/21 10:34:35 $ -;; Version: $Revision: 1.14 $ +;; Date: $Date: 2007/06/21 13:39:10 $ +;; Version: $Revision: 1.15 $ ;; Keywords: internal ;; This file is part of XEmacs. @@ -69,7 +69,7 @@ emacs_minor_version\\s-*=\\s-*\\([0-9]+\\) emacs_beta_version\\s-*=\\s-*\\([0-9]+\\)? xemacs_codename\\s-*=\\s-*\"\\([^\"]+\\)\"\\( -xemacs_extra_name\\s-*=\\s-*\"\\([^\"]+\\)\"\\)?" +xemacs_extra_name\\s-*=\\s-*\"?\\([^\"]+\\)\"?\\)?" "*REGEXP matching XEmacs Beta Version variable assignments in `build-report-version-file' file. This variable is used by `build-report-version-file-data'.") @@ -520,7 +520,7 @@ "Concatenate elements of `build-report-delete-regexp' and a general MIME tag REGEXP. The result is a REGEXP string matching either of the REGEXPs in `build-report-delete-regexp' or a general MIME tag REGEXP." - (mapconcat '(lambda (item) item) + (mapconcat #'identity build-report-delete-regexp "\\|")) (defun build-report-installation-data (&optional file) diff -r 71bf2c5667ba -r 66411359ce4e lisp/byte-optimize.el --- a/lisp/byte-optimize.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/byte-optimize.el Sat Oct 25 21:40:46 2008 +0900 @@ -1168,6 +1168,21 @@ (if constant (eval form) form))) + +(defvar byte-optimize-ever-present-features + '(xemacs cl cl-extra cl-19 backquote)) + +(put 'featurep 'byte-optimizer 'byte-optimize-featurep) +(defun byte-optimize-featurep (form) + (if (memq (car-safe + (cdr-safe + (car-safe + (cdr-safe + form)))) + byte-optimize-ever-present-features) + t + form)) + ;;; enumerating those functions which need not be called if the returned ;;; value is not used. That is, something like diff -r 71bf2c5667ba -r 66411359ce4e lisp/bytecomp.el --- a/lisp/bytecomp.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/bytecomp.el Sat Oct 25 21:40:46 2008 +0900 @@ -1888,7 +1888,8 @@ (print-readably t) ; print #[] for bytecode, 'x for (quote x) (print-gensym (if (and byte-compile-print-gensym (not byte-compile-emacs19-compatibility)) - t nil))) + '(t) nil)) + print-gensym-alist) (princ "\n" byte-compile-outbuffer) (prin1 form byte-compile-outbuffer) nil))) @@ -2376,13 +2377,47 @@ (put 'custom-declare-variable 'byte-hunk-handler 'byte-compile-file-form-custom-declare-variable) (defun byte-compile-file-form-custom-declare-variable (form) - (if (memq 'free-vars byte-compile-warnings) - (setq byte-compile-bound-variables - (cons (cons (nth 1 (nth 1 form)) - byte-compile-global-bit) - byte-compile-bound-variables))) - form) - + ;; XEmacs change; our implementation byte compiles and gives warnings + ;; about the default value code, which GNU's doesn't. + (let* ((quoted-default (car-safe (cdr-safe (cdr-safe form)))) + (to-examine (car-safe (cdr-safe quoted-default)))) + (if (memq 'free-vars byte-compile-warnings) + (setq byte-compile-bound-variables + (cons (cons (nth 1 (nth 1 form)) + byte-compile-global-bit) + byte-compile-bound-variables))) + ;; Byte compile anything that smells like a lambda. I initially + ;; considered limiting it to the :initialize, :set and :get args, but + ;; that's not amazingly forward-compatible, and anyone expecting other + ;; things to be stored as data, not code, is unrealistic. + (loop + for entry in-ref (nthcdr 4 form) + do (cond ((and (eq 'function (car-safe entry)) + (consp (car-safe (cdr-safe entry)))) + (setf entry (copy-sequence entry)) + (setcar (cdr entry) (byte-compile-lambda (car (cdr entry))))) + ((and (eq 'lambda (car-safe entry))) + (setf entry (byte-compile-lambda entry))))) + ;; Byte compile the default value, as we do for defvar. + (when (consp (cdr-safe to-examine)) + (setq form (copy-sequence form)) + (setcdr (third form) + (list (byte-compile-top-level to-examine nil 'file))) + ;; And save a value to be examined in the custom UI, if that differs + ;; from the init value. + (unless (equal to-examine (car-safe (cdr (third form)))) + (setcdr (third form) + (list (byte-compile-top-level + ;; This is ugly. custom-declare-variable errors if + ;; it's passed a keyword it doesn't know about, and + ;; so to make this code run on 21.4, we add code to + ;; modify the standard-value property to the + ;; byte-compiled value for DEFAULT. + `(prog2 (put ,(second form) 'standard-value + '(,to-examine)) + ,to-examine) + nil 'file))))) + form)) ;;;###autoload (defun byte-compile (form) diff -r 71bf2c5667ba -r 66411359ce4e lisp/cmdloop.el --- a/lisp/cmdloop.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/cmdloop.el Sat Oct 25 21:40:46 2008 +0900 @@ -488,7 +488,10 @@ The user must confirm the answer with RET, and can edit it until it as been confirmed." (if (should-use-dialog-box-p) - (yes-or-no-p-dialog-box prompt) + ;; and-fboundp is redundant, since yes-or-no-p-dialog-box is only + ;; bound if (featurep 'dialog). But it eliminates a compile-time + ;; warning. + (and-fboundp #'yes-or-no-p-dialog-box (yes-or-no-p-dialog-box prompt)) (yes-or-no-p-minibuf prompt))) (defun y-or-n-p (prompt) diff -r 71bf2c5667ba -r 66411359ce4e lisp/code-files.el --- a/lisp/code-files.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/code-files.el Sat Oct 25 21:40:46 2008 +0900 @@ -235,10 +235,10 @@ ;(defun convert-mbox-coding-system (filename visit start end) ...) -(defun load (file &optional noerror nomessage nosuffix) - "Execute a file of Lisp code named FILE, or load a binary module. -First tries to find a Lisp FILE with .elc appended, then with .el, then with - FILE unmodified. If unsuccessful, tries to find a binary module FILE with +(defun load (filename &optional noerror nomessage nosuffix) + "Execute a file of Lisp code named FILENAME, or load a binary module. +First tries to find a Lisp file FILENAME with .elc appended, then with .el, then with + FILENAME unmodified. If unsuccessful, tries to find a binary module FILE with the elements of `module-extensions' appended, one at a time. Searches directories in load-path for Lisp files, and in `module-load-path' for binary modules. @@ -250,9 +250,8 @@ .elc, .el, or elements of `module-extensions' to the specified name FILE. Return t if file exists." (declare (special load-modules-quietly)) - (let* ((filename (substitute-in-file-name file)) - (handler (find-file-name-handler filename 'load)) - (path nil)) + (let ((handler (find-file-name-handler filename 'load)) + (path nil)) (if handler (funcall handler 'load filename noerror nomessage nosuffix) ;; First try to load a Lisp file @@ -262,10 +261,10 @@ '(".elc" ".el" ""))))) ;; now use the internal load to actually load the file. (load-internal - file noerror nomessage nosuffix + filename noerror nomessage nosuffix (let ((elc ; use string= instead of string-match to keep match-data. - (equalp ".elc" (substring path -4)))) - (or (and (not elc) coding-system-for-read) ;prefer for source file + (equalp ".elc" (substring path -4)))) + (or (and (not elc) coding-system-for-read) ;prefer for source file ;; find magic-cookie (let ((codesys (find-coding-system-magic-cookie-in-file path))) @@ -357,8 +356,11 @@ If visiting and the file does not exist, visiting is completed before the error is signaled. -The optional third and fourth arguments START and END -specify what portion of the file to insert. +The optional third and fourth arguments START and END specify what portion +of the file to insert, and start at zero, in direct and needless contrast to +buffer offsets. That is, values of 0 and 10 for START and END respectively +will give the first ten octets of a file. + If VISIT is non-nil, START and END must be nil. If optional fifth argument REPLACE is non-nil, it means replace the current buffer contents (in the accessible portion) @@ -398,8 +400,7 @@ See also `insert-file-contents-access-hook', `insert-file-contents-pre-hook', `insert-file-contents-error-hook', and `insert-file-contents-post-hook'." - (let* ((expanded (substitute-in-file-name filename)) - (handler (find-file-name-handler expanded 'insert-file-contents))) + (let ((handler (find-file-name-handler filename 'insert-file-contents))) (if handler (funcall handler 'insert-file-contents filename visit start end replace) (let (return-val coding-system used-codesys) @@ -510,48 +511,61 @@ FILENAME, APPEND, VISIT, LOCKNAME, and CODING-SYSTEM, the same as the corresponding arguments in the call to `write-region'.") -(defun write-region (start end filename - &optional append visit lockname coding-system) +(defun write-region (start end filename &optional append visit lockname + coding-system-or-mustbenew) "Write current region into specified file. -By default the file's existing contents are replaced by the specified region. -Called interactively, prompts for a file name. With a prefix arg, prompts -for a coding system as well. +Called interactively, prompts for a file name. +With a prefix arg, prompts for a coding system as well. When called from a program, takes three required arguments: START, END and FILENAME. START and END are buffer positions. -Optional fourth argument APPEND if non-nil means - append to existing file contents (if any). -Optional fifth argument VISIT if t means - set last-save-file-modtime of buffer to this file's modtime - and mark buffer not modified. -If VISIT is a string, it is a second file name; - the output goes to FILENAME, but the buffer is marked as visiting VISIT. - VISIT is also the file name to lock and unlock for clash detection. -If VISIT is neither t nor nil nor a string, - that means do not print the \"Wrote file\" message. -The optional sixth arg LOCKNAME, if non-nil, specifies the name to - use for locking and unlocking, overriding FILENAME and VISIT. -Kludgy feature: if START is a string, then that string is written -to the file, instead of any buffer contents, and END is ignored. -Optional seventh argument CODING-SYSTEM specifies the coding system - used to encode the text when it is written out, and defaults to - the value of `buffer-file-coding-system' in the current buffer. +APPEND, if non-nil, means append to existing file contents (if any), else + the file's existing contents are replaced by the specified region. +VISIT, if non-nil, should be a string naming a file. The buffer is marked + as visiting VISIT. VISIT is also the file name to lock + and unlock for clash detection. +LOCKNAME, if non-nil, specifies the name to use for locking and unlocking, + overriding FILENAME and VISIT. +CODING-SYSTEM-OR-MUSTBENEW specifies the coding system used to encode the + text written. It defaults to the value of `buffer-file-coding-system' + in the current buffer. + +For compatibility with GNU Emacs, several arguments are overloaded: +START may be a string, which is written to the file. END is ignored. +VISIT may take the value t, meaning to set last-save-file-modtime of buffer + to this file's modtime and mark buffer not modified. With any other + non-nil value of VISIT, suppress printing of the \"Wrote file\" message. +CODING-SYSTEM-OR-MUSTBENEW may be a non-nil, non-coding-system value. + If it is `excl' and FILENAME already exists, signal `file-already-exists'. + Otherwise, if FILENAME already exists, ask for confirmation before + writing, and signal `file-already-exists' if not confirmed. + See also `write-region-pre-hook' and `write-region-post-hook'." (interactive "r\nFWrite region to file: \ni\ni\ni\nZCoding-system: ") - (setq coding-system - (or coding-system-for-write - (run-hook-with-args-until-success - 'write-region-pre-hook - start end filename append visit lockname coding-system) - coding-system - buffer-file-coding-system - (find-file-coding-system-for-write-from-filename filename) - )) - (if (consp coding-system) - ;; One of the `write-region-pre-hook' functions wrote the file - coding-system - (let ((func - (coding-system-property coding-system 'pre-write-conversion))) + (let (mustbenew coding-system func hook-result) + (setq hook-result + (or coding-system-for-write + (run-hook-with-args-until-success + 'write-region-pre-hook + start end filename append visit lockname + coding-system-or-mustbenew) + (if (and coding-system-or-mustbenew + (coding-system-p + (find-coding-system coding-system-or-mustbenew))) + coding-system-or-mustbenew) + buffer-file-coding-system + (find-file-coding-system-for-write-from-filename filename))) + (if (consp hook-result) + ;; One of the `write-region-pre-hook' functions wrote the file. + hook-result + ;; The hooks didn't do the work; do it ourselves. + (setq hook-result (find-coding-system hook-result) + mustbenew (unless (coding-system-p + (find-coding-system coding-system-or-mustbenew)) + coding-system-or-mustbenew) + coding-system (cond ((coding-system-p hook-result) hook-result) + ((null mustbenew) coding-system-or-mustbenew)) + func (coding-system-property coding-system 'pre-write-conversion)) (if func (let ((curbuf (current-buffer)) (tempbuf (generate-new-buffer " *temp-write-buffer*")) @@ -566,7 +580,8 @@ append (if (eq visit t) nil visit) lockname - coding-system)) + coding-system + mustbenew)) ;; leaving a buffer associated with file will cause problems ;; when next visiting. (kill-buffer tempbuf) @@ -576,7 +591,7 @@ (set-buffer-modified-p nil) (if (buffer-file-name) (set-visited-file-modtime)))))) (write-region-internal start end filename append visit lockname - coding-system))) + coding-system mustbenew))) (run-hook-with-args 'write-region-post-hook start end filename append visit lockname coding-system))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/coding.el --- a/lisp/coding.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/coding.el Sat Oct 25 21:40:46 2008 +0900 @@ -108,7 +108,7 @@ terminal-coding-system) (defun set-terminal-coding-system (coding-system) - "Set the coding system used for TTY display output. Currently broken." + "Set the coding system used for TTY display output." (interactive "zterminal-coding-system: ") (get-coding-system coding-system) ; correctness check (setq terminal-coding-system coding-system) @@ -266,13 +266,11 @@ (when (not (featurep 'mule)) (define-coding-system-alias 'escape-quoted 'binary) ;; these are so that gnus and friends work when not mule - (define-coding-system-alias 'iso-8859-1 'undecided) - (define-coding-system-alias 'iso-8859-2 'undecided) - (define-coding-system-alias 'ctext 'binary)) - - -;; compatibility for old XEmacsen (don't use it) -(define-coding-system-alias 'automatic-conversion 'undecided) + (define-coding-system-alias 'iso-8859-1 'raw-text) + ;; We're misrepresenting ourselves to the gnus code by saying we support + ;; both. + ; (define-coding-system-alias 'iso-8859-2 'raw-text) + (define-coding-system-alias 'ctext 'raw-text)) (make-compatible-variable 'enable-multibyte-characters "Unimplemented") diff -r 71bf2c5667ba -r 66411359ce4e lisp/cus-edit.el --- a/lisp/cus-edit.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/cus-edit.el Sat Oct 25 21:40:46 2008 +0900 @@ -1,10 +1,11 @@ ;;; cus-edit.el --- Tools for customizating Emacs and Lisp packages. ;; +;; Copyright (C) 2007, 2008 Didier Verna +;; Copyright (C) 2003 Ben Wing ;; Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. -;; Copyright (C) 2003 Ben Wing. ;; ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Didier Verna ;; Keywords: help, faces ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ @@ -306,7 +307,7 @@ (and (boundp symbol) (or (get symbol 'custom-type) (user-variable-p symbol)))) - t nil nil (and v (symbol-name v)))) + t nil nil (and v (symbol-name v)))) (list (if (equal val "") (if (symbolp v) v nil) (intern val))))) @@ -651,8 +652,8 @@ (defun custom-prompt-variable (prompt-var prompt-val &optional comment) "Prompt for a variable and a value and return them as a list. PROMPT-VAR is the prompt for the variable, and PROMPT-VAL is the -prompt for the value. The %s escape in PROMPT-VAL is replaced with -the name of the variable. +prompt for the value. A %s escape in PROMPT-VAL is replaced with +the name of the variable. A final colon is appended to both prompts. If the variable has a `variable-interactive' property, that is used as if it were the arg to `interactive' (which see) to interactively read the value. @@ -662,7 +663,7 @@ If optional COMMENT argument is non nil, also prompt for a comment and return it as the third element in the list." - (let* ((var (read-variable prompt-var)) + (let* ((var (read-variable (concat prompt-var ": "))) (minibuffer-help-form '(describe-variable var)) (val (let ((prop (get var 'variable-interactive)) @@ -683,12 +684,11 @@ (symbol-value var)) (not (boundp var)))) (t - (eval-minibuffer prompt)))))) + (eval-minibuffer (concat prompt ": "))))))) (if comment (list var val (read-string "Comment: " (get var 'variable-comment))) - (list var val)) - )) + (list var val)))) ;;;###autoload (defun customize-set-value (var val &optional comment) @@ -701,8 +701,8 @@ `:prompt-value' property of that widget will be used for reading the value. If given a prefix (or a COMMENT argument), also prompt for a comment." - (interactive (custom-prompt-variable "Set variable: " - "Set %s to value: " + (interactive (custom-prompt-variable "Set variable" + "Set value of %s" current-prefix-arg)) (set var val) @@ -728,8 +728,8 @@ `:prompt-value' property of that widget will be used for reading the value. If given a prefix (or a COMMENT argument), also prompt for a comment." - (interactive (custom-prompt-variable "Set variable: " - "Set customized value for %s to: " + (interactive (custom-prompt-variable "Set variable" + "Set customized value of %s" current-prefix-arg)) (funcall (or (get variable 'custom-set) 'set-default) variable value) (put variable 'customized-value (list (custom-quote value))) @@ -757,8 +757,8 @@ `:prompt-value' property of that widget will be used for reading the value. If given a prefix (or a COMMENT argument), also prompt for a comment." - (interactive (custom-prompt-variable "Set and save variable: " - "Set and save value for %s as: " + (interactive (custom-prompt-variable "Set and save variable" + "Set and save value of %s" current-prefix-arg)) (funcall (or (get variable 'custom-set) 'set-default) variable value) (put variable 'saved-value (list (custom-quote value))) @@ -825,7 +825,8 @@ (defun customize-changed-options (since-version) "Customize all user option variables whose default values changed recently. This means, in other words, variables defined with a `:version' keyword." - (interactive "sCustomize options changed, since version (default all versions): ") + (interactive + "sCustomize options changed, since version (default all versions): ") (if (equal since-version "") (setq since-version nil)) (let ((found nil)) @@ -834,7 +835,8 @@ (let ((version (get symbol 'custom-version))) (and version (or (null since-version) - (customize-version-lessp since-version version)))) + (customize-version-lessp since-version + version)))) (push (list symbol 'custom-variable) found)))) (unless found (error "No user options have changed defaults %s" @@ -868,39 +870,86 @@ (list (list symbol 'custom-variable)) (format "*Customize Option: %s*" (custom-unlispify-tag-name symbol)))) -;;;###autoload -(defun customize-face (&optional symbol) - "Customize SYMBOL, which should be a face name or nil. -If SYMBOL is nil, customize all faces." - (interactive (list (completing-read "Customize face: (default all) " - obarray 'find-face))) - (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) - (custom-buffer-create (custom-sort-items - (mapcar (lambda (symbol) - (list symbol 'custom-face)) - (face-list)) - t nil) - "*Customize Faces*") - (when (stringp symbol) - (setq symbol (intern symbol))) - (check-argument-type 'symbolp symbol) - (custom-buffer-create (list (list symbol 'custom-face)) - (format "*Customize Face: %s*" - (custom-unlispify-tag-name symbol))))) + +(defun custom-face-prompt () + ;; Interactive call for `customize-face' and `customize-face-other-window'. + ;; See their docstrings for more information. Note that this call returns a + ;; list of only one element. This is because the callers'second arg AT-POINT + ;; is only used in interactive calls. + (let ((faces (get-char-property (point) 'face))) + (if (or (null faces) (not current-prefix-arg)) + ;; The default behavior, which is to prompt for all faces, is also + ;; used as a fall back when a prefix is given but there's no face + ;; under point: + (let ((choice (completing-read "Customize face: (default all) " + obarray 'find-face))) + (if (zerop (length choice)) + nil + (list (intern choice)))) + (cond ((symbolp faces) + ;; Customize only this one: + (list (list faces))) + ((listp faces) + ;; Make a choice only amongst the faces under point: + (let ((choice (completing-read + "Customize face: (default all faces at point) " + (mapcar (lambda (face) + (list (symbol-name face) face)) + faces) + nil t))) + (if (zerop (length choice)) + (list faces) + (list (intern choice))))))))) + +(defun customize-face-1 (face custom-buffer-create-fn) + ;; Customize FACE in a buffer created with BUFFER-CREATE-FN. + ;; See the docstring of `customize-face' and `customize-face-other-window' + ;; for more information. + (cond ((null face) + (funcall custom-buffer-create-fn + (custom-sort-items + (mapcar (lambda (symbol) + (list symbol 'custom-face)) + (face-list)) + t nil) + "*Customize All Faces*")) + ((listp face) + (funcall custom-buffer-create-fn + (custom-sort-items + (mapcar (lambda (symbol) + (list symbol 'custom-face)) + face) + t nil) + "*Customize Some Faces*")) + ((symbolp face) + (funcall custom-buffer-create-fn + (list (list face 'custom-face)) + (format "*Customize Face: %s*" + (custom-unlispify-tag-name face)))) + (t + (signal-error 'wrong-type-argument + '((or null listp symbolp) face))))) + ;;;###autoload -(defun customize-face-other-window (&optional symbol) - "Show customization buffer for FACE in other window." - (interactive (list (completing-read "Customize face: " - obarray 'find-face))) - (if (or (null symbol) (and (stringp symbol) (zerop (length symbol)))) - () - (if (stringp symbol) - (setq symbol (intern symbol))) - (check-argument-type 'symbolp symbol) - (custom-buffer-create-other-window - (list (list symbol 'custom-face)) - (format "*Customize Face: %s*" (custom-unlispify-tag-name symbol))))) +(defun customize-face (&optional face at-point) + "Open a customization buffer for FACE. +FACE should be either: +- nil, meaning to customize all faces, +- a list of symbols naming faces, meaning to customize only those, +- a symbol naming a face, meaning to customize this face only. + +When called interactively, use a prefix (the AT-POINT argument) to +make a choice among the faces found at current position." + (interactive (custom-face-prompt)) + (customize-face-1 face #'custom-buffer-create)) + +;;;###autoload +(defun customize-face-other-window (&optional face at-point) + "Like `customize-face', but use another window." + (interactive (custom-face-prompt)) + (customize-face-1 face #'custom-buffer-create-other-window)) + ;;;###autoload (defun customize-customized () @@ -1770,7 +1819,7 @@ (return-from custom-load nil))) #'(lambda () (load (expand-file-name "custom-defines" dir)))))) - ;; we get here only from the `return-from'; see above + ;; we get here only from the `return-from'; see above (load source)))) (defun custom-load-widget (widget) @@ -2203,36 +2252,37 @@ (widget-put widget :custom-state state))) (defvar custom-variable-menu - '(("Set for Current Session" custom-variable-set - (lambda (widget) - (eq (widget-get widget :custom-state) 'modified))) + `(("Set for Current Session" custom-variable-set + ,#'(lambda (widget) + (eq (widget-get widget :custom-state) 'modified))) ("Save for Future Sessions" custom-variable-save - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set changed rogue)))) + ,#'(lambda (widget) + (memq (widget-get widget :custom-state) + '(modified set changed rogue)))) ("Reset to Current" custom-redraw - (lambda (widget) - (and (default-boundp (widget-value widget)) - (memq (widget-get widget :custom-state) '(modified changed))))) + ,#'(lambda (widget) + (and (default-boundp (widget-value widget)) + (memq (widget-get widget :custom-state) '(modified changed))))) ("Reset to Saved" custom-variable-reset-saved - (lambda (widget) - (and (or (get (widget-value widget) 'saved-value) - (get (widget-value widget) 'saved-variable-comment)) - (memq (widget-get widget :custom-state) - '(modified set changed rogue))))) + ,#'(lambda (widget) + (and (or (get (widget-value widget) 'saved-value) + (get (widget-value widget) 'saved-variable-comment)) + (memq (widget-get widget :custom-state) + '(modified set changed rogue))))) ("Reset to Standard Settings" custom-variable-reset-standard - (lambda (widget) - (and (get (widget-value widget) 'standard-value) - (memq (widget-get widget :custom-state) - '(modified set changed saved rogue))))) + ,#'(lambda (widget) + (and (get (widget-value widget) 'standard-value) + (memq (widget-get widget :custom-state) + '(modified set changed saved rogue))))) ("---" ignore ignore) ("Add Comment" custom-comment-show custom-comment-invisible-p) ("---" ignore ignore) ("Don't show as Lisp expression" custom-variable-edit - (lambda (widget) - (eq (widget-get widget :custom-form) 'lisp))) + ,#'(lambda (widget) + (eq (widget-get widget :custom-form) 'lisp))) ("Show as Lisp expression" custom-variable-edit-lisp - (lambda (widget) - (eq (widget-get widget :custom-form) 'edit)))) + ,#'(lambda (widget) + (eq (widget-get widget :custom-form) 'edit)))) "Alist of actions for the `custom-variable' widget. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the @@ -2544,8 +2594,8 @@ "Customize face." :sample-face 'custom-face-tag-face :help-echo "Set or reset this face" - :documentation-property '(lambda (face) - (face-doc-string face)) + :documentation-property #'(lambda (face) + (face-doc-string face)) :value-create 'custom-face-value-create :action 'custom-face-action :custom-category 'face @@ -2694,27 +2744,27 @@ (message "Creating face editor...done")))))) (defvar custom-face-menu - '(("Set for Current Session" custom-face-set) + `(("Set for Current Session" custom-face-set) ("Save for Future Sessions" custom-face-save) ("Reset to Saved" custom-face-reset-saved - (lambda (widget) - (or (get (widget-value widget) 'saved-face) - (get (widget-value widget) 'saved-face-comment)))) + ,#'(lambda (widget) + (or (get (widget-value widget) 'saved-face) + (get (widget-value widget) 'saved-face-comment)))) ("Reset to Standard Setting" custom-face-reset-standard - (lambda (widget) - (get (widget-value widget) 'face-defface-spec))) + ,#'(lambda (widget) + (get (widget-value widget) 'face-defface-spec))) ("---" ignore ignore) ("Add Comment" custom-comment-show custom-comment-invisible-p) ("---" ignore ignore) ("Show all display specs" custom-face-edit-all - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'all)))) + ,#'(lambda (widget) + (not (eq (widget-get widget :custom-form) 'all)))) ("Just current attributes" custom-face-edit-selected - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'selected)))) + ,#'(lambda (widget) + (not (eq (widget-get widget :custom-form) 'selected)))) ("Show as Lisp expression" custom-face-edit-lisp - (lambda (widget) - (not (eq (widget-get widget :custom-form) 'lisp))))) + ,#'(lambda (widget) + (not (eq (widget-get widget :custom-form) 'lisp))))) "Alist of actions for the `custom-face' widget. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the @@ -3336,21 +3386,21 @@ (insert "/\n"))))) (defvar custom-group-menu - '(("Set for Current Session" custom-group-set - (lambda (widget) - (eq (widget-get widget :custom-state) 'modified))) + `(("Set for Current Session" custom-group-set + ,#'(lambda (widget) + (eq (widget-get widget :custom-state) 'modified))) ("Save for Future Sessions" custom-group-save - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set)))) + ,#'(lambda (widget) + (memq (widget-get widget :custom-state) '(modified set)))) ("Reset to Current" custom-group-reset-current - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified)))) + ,#'(lambda (widget) + (memq (widget-get widget :custom-state) '(modified)))) ("Reset to Saved" custom-group-reset-saved - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set)))) + ,#'(lambda (widget) + (memq (widget-get widget :custom-state) '(modified set)))) ("Reset to standard setting" custom-group-reset-standard - (lambda (widget) - (memq (widget-get widget :custom-state) '(modified set saved))))) + ,#'(lambda (widget) + (memq (widget-get widget :custom-state) '(modified set saved))))) "Alist of actions for the `custom-group' widget. Each entry has the form (NAME ACTION FILTER) where NAME is the name of the menu entry, ACTION is the function to call on the widget when the @@ -3496,40 +3546,40 @@ (goto-char (point-min)) (condition-case nil (while (not (eobp)) - (let ((sexp (read (current-buffer)))) - (when (and (listp sexp) - (memq (car sexp) symbols)) - (delete-region (save-excursion - (backward-sexp) - (point)) - (point)) - (while (and (eolp) (not (eobp))) - (delete-region (point) (prog2 (forward-line 1) (point)))) - ))) + (let ((sexp (read (current-buffer)))) + (when (and (listp sexp) + (memq (car sexp) symbols)) + (delete-region (save-excursion + (backward-sexp) + (point)) + (point)) + (while (and (eolp) (not (eobp))) + (delete-region (point) (prog2 (forward-line 1) (point)))) + ))) (end-of-file nil))) (defsubst custom-save-variable-p (symbol) "Return non-nil if symbol SYMBOL is a customized variable." (and (symbolp symbol) (let ((spec (car-safe (get symbol 'theme-value)))) - (or (and spec (eq (car spec) 'user) - (eq (second spec) 'set)) - (get symbol 'saved-variable-comment) - ;; support non-themed vars - (and (null spec) (get symbol 'saved-value)))))) + (or (and spec (eq (car spec) 'user) + (eq (second spec) 'set)) + (get symbol 'saved-variable-comment) + ;; support non-themed vars + (and (null spec) (get symbol 'saved-value)))))) (defun custom-save-variable-internal (symbol) "Print variable SYMBOL to the standard output. SYMBOL must be a customized variable." (let ((requests (get symbol 'custom-requests)) - (now (not (or (get symbol 'standard-value) - (and (not (boundp symbol)) - (not (eq (get symbol 'force-value) - 'rogue)))))) - (comment (get symbol 'saved-variable-comment)) - ;; Print everything, no placeholders `...' - (print-level nil) - (print-length nil)) + (now (not (or (get symbol 'standard-value) + (and (not (boundp symbol)) + (not (eq (get symbol 'force-value) + 'rogue)))))) + (comment (get symbol 'saved-variable-comment)) + ;; Print everything, no placeholders `...' + (print-level nil) + (print-length nil)) (unless (custom-save-variable-p symbol) (error 'wrong-type-argument "Not a customized variable" symbol)) (princ "\n '(") @@ -3540,10 +3590,10 @@ ;; (prin1 (third spec)) ;; XEmacs -- pretty-print value if available (if (and custom-save-pretty-print - (fboundp 'pp)) - ;; To suppress bytecompiler warning - (with-fboundp 'pp - (pp (car (get symbol 'saved-value)))) + (fboundp 'pp)) + ;; To suppress bytecompiler warning + (with-fboundp 'pp + (pp (car (get symbol 'saved-value)))) (prin1 (car (get symbol 'saved-value)))) (when (or now requests comment) (princ (if now " t" " nil"))) @@ -3570,21 +3620,21 @@ (custom-save-loaded-themes) (custom-save-resets 'theme-value 'custom-reset-variables nil) (let ((standard-output (current-buffer)) - (sorted-list ())) + (sorted-list ())) ;; First create a sorted list of saved variables. (mapatoms - (lambda (symbol) - (when (custom-save-variable-p symbol) - (push symbol sorted-list)))) + (lambda (symbol) + (when (custom-save-variable-p symbol) + (push symbol sorted-list)))) (setq sorted-list (sort sorted-list 'string<)) (unless (bolp) - (princ "\n")) + (princ "\n")) (princ "(custom-set-variables") (mapc 'custom-save-variable-internal - sorted-list) + sorted-list) (princ ")") (unless (looking-at "\n") - (princ "\n"))))) + (princ "\n"))))) (defvar custom-save-face-ignoring nil) @@ -3593,14 +3643,14 @@ (let ((theme-spec (car-safe (get symbol 'theme-face))) (comment (get symbol 'saved-face-comment))) (or (and (not (memq symbol custom-save-face-ignoring)) - ;; Don't print default face here. - (or (and theme-spec - (eq (car theme-spec) 'user) - (eq (second theme-spec) 'set)) - ;; cope with non-themed faces - (and (null theme-spec) - (get symbol 'saved-face)))) - comment))) + ;; Don't print default face here. + (or (and theme-spec + (eq (car theme-spec) 'user) + (eq (second theme-spec) 'set)) + ;; cope with non-themed faces + (and (null theme-spec) + (get symbol 'saved-face)))) + comment))) (defun custom-save-face-internal (symbol) "Print face SYMBOL to the standard output. @@ -3609,24 +3659,24 @@ (now (not (or (get symbol 'face-defface-spec) (and (not (find-face symbol)) (not (eq (get symbol 'force-face) 'rogue)))))) - ;; Print everything, no placeholders `...' - (print-level nil) - (print-length nil)) + ;; Print everything, no placeholders `...' + (print-level nil) + (print-length nil)) (if (memq symbol custom-save-face-ignoring) - ;; Do nothing - nil + ;; Do nothing + nil ;; Print face (unless (custom-save-face-p symbol) - (error 'wrong-type-argument "Not a customized face" symbol)) + (error 'wrong-type-argument "Not a customized face" symbol)) (princ "\n '(") (prin1 symbol) (princ " ") (prin1 (get symbol 'saved-face)) (if (or comment now) - (princ (if now " t" " nil"))) + (princ (if now " t" " nil"))) (when comment - (princ " ") - (prin1 comment)) + (princ " ") + (prin1 comment)) (princ ")")))) (defun custom-save-faces () @@ -3641,22 +3691,22 @@ ;; 'custom-set-faces) (custom-save-resets 'theme-face 'custom-reset-faces '(default)) (let ((standard-output (current-buffer)) - (sorted-list ())) + (sorted-list ())) ;; Create a sorted list of faces (mapatoms (lambda (symbol) - (when (custom-save-face-p symbol) - (push symbol sorted-list)))) + (when (custom-save-face-p symbol) + (push symbol sorted-list)))) (setq sorted-list (sort sorted-list 'string<)) (unless (bolp) (princ "\n")) (princ "(custom-set-faces") ;; The default face must be first, since it affects the others. (when (custom-save-face-p 'default) - (custom-save-face-internal 'default)) + (custom-save-face-internal 'default)) (let ((custom-save-face-ignoring '(default))) (mapc 'custom-save-face-internal - sorted-list)) + sorted-list)) (princ ")") (unless (looking-at "\n") (princ "\n"))))) @@ -3665,35 +3715,35 @@ "Create a mapper for `custom-save-resets'." `(lambda (object) (let ((spec (car-safe (get object (quote ,property)))) - (print-level nil) - (print-length nil)) + (print-level nil) + (print-length nil)) (with-boundp '(ignored-special started-writing) - (when (and (not (memq object ignored-special)) - (eq (car spec) 'user) - (eq (second spec) 'reset)) - ;; Do not write reset statements unless necessary. - (unless started-writing - (setq started-writing t) - (unless (bolp) - (princ "\n")) - (princ "(") - (princ (quote ,setter)) - (princ "\n '(") - (prin1 object) - (princ " ") - (prin1 (third spec)) - (princ ")"))))))) + (when (and (not (memq object ignored-special)) + (eq (car spec) 'user) + (eq (second spec) 'reset)) + ;; Do not write reset statements unless necessary. + (unless started-writing + (setq started-writing t) + (unless (bolp) + (princ "\n")) + (princ "(") + (princ (quote ,setter)) + (princ "\n '(") + (prin1 object) + (princ " ") + (prin1 (third spec)) + (princ ")"))))))) (defconst custom-save-resets-mapper-alist (eval-when-compile (list (list 'theme-value 'custom-reset-variables - (byte-compile - (make-custom-save-resets-mapper - 'theme-value 'custom-reset-variables))) - (list 'theme-face 'custom-reset-faces - (byte-compile - (make-custom-save-resets-mapper - 'theme-face 'custom-reset-faces))))) + (byte-compile + (make-custom-save-resets-mapper + 'theme-value 'custom-reset-variables))) + (list 'theme-face 'custom-reset-faces + (byte-compile + (make-custom-save-resets-mapper + 'theme-face 'custom-reset-faces))))) "Never use it. Hashes several heavily used functions for `custom-save-resets'") @@ -3703,9 +3753,9 @@ ;; (custom-save-delete setter) Done by caller (let ((standard-output (current-buffer)) (mapper (let ((triple (assq property custom-save-resets-mapper-alist))) - (if (and triple (eq (second triple) setter)) - (third triple) - (make-custom-save-resets-mapper property setter))))) + (if (and triple (eq (second triple) setter)) + (third triple) + (make-custom-save-resets-mapper property setter))))) (mapc mapper special) (setq ignored-special special) (mapatoms mapper) @@ -3716,8 +3766,8 @@ (defun custom-save-loaded-themes () (let ((themes (reverse (get 'user 'theme-loads-themes))) (standard-output (current-buffer)) - (print-level nil) - (print-length nil)) + (print-level nil) + (print-length nil)) (when themes (unless (bolp) (princ "\n")) (princ "(custom-load-themes") @@ -3756,11 +3806,20 @@ ;;;###autoload (defun custom-save-all () "Save all customizations in `custom-file'." + (when init-file-had-error + (error 'invalid-change + "Cannot save customizations; init file was not fully loaded")) (let ((inhibit-read-only t)) (custom-save-variables) (custom-save-faces) (let ((find-file-hooks nil) - (auto-mode-alist)) + (auto-mode-alist) + custom-file-directory) + (unless (file-directory-p (setq custom-file-directory + (file-name-directory custom-file))) + (message "Creating %s... " custom-file-directory) + (make-directory custom-file-directory t) + (message "Creating %s... done." custom-file-directory)) (with-current-buffer (find-file-noselect custom-file) (save-buffer))))) @@ -3910,7 +3969,7 @@ Invoke button under point. \\[widget-button-press] Set all modifications. \\[Custom-set] Make all modifications default. \\[Custom-save] -Reset all modified options. \\[Custom-reset-current] +Reset all modified options. \\[Custom-reset-current] Reset all modified or set options. \\[Custom-reset-saved] Reset all options. \\[Custom-reset-standard] diff -r 71bf2c5667ba -r 66411359ce4e lisp/custom.el --- a/lisp/custom.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/custom.el Sat Oct 25 21:40:46 2008 +0900 @@ -116,9 +116,11 @@ (t (eval value))))) -(defun custom-initialize-changed (symbol value) +;; XEmacs change; move to defsubst, since this is only called in one place +;; and usage of it clusters. +(defsubst custom-initialize-changed (symbol value) "Initialize SYMBOL with VALUE. -Like `custom-initialize-reset', but only use the `:set' function if the +Like `custom-initialize-reset', but only use the `:set' function if not using the standard setting. For the standard setting, use `set-default'." (cond ((default-boundp symbol) @@ -142,9 +144,15 @@ `custom-known-themes' for a list of known themes. For backwards compatibility, DEFAULT is also stored in SYMBOL's property `standard-value'. At the same time, SYMBOL's property `force-value' is -set to nil, as the value is no longer rogue." +set to nil, as the value is no longer rogue. + +The byte compiler adds an XEmacs-specific :default keyword and value to +`custom-declare-variable' calls when it byte-compiles the DEFAULT argument. +These describe what the custom UI shows when editing a customizable +variable's associated Lisp expression. We don't encourage use of this +keyword in your own programs. " ;; Remember the standard setting. The value should be in the standard - ;; theme, not in this property. However, his would require changeing + ;; theme, not in this property. However, this would require changing ;; the C source of defvar and others as well... (put symbol 'standard-value (list default)) ;; Maybe this option was rogue in an earlier version. It no longer is. @@ -184,6 +192,10 @@ value) ;; Fast code for the common case. (put symbol 'custom-options (copy-sequence value)))) + ;; In the event that the byte compile has compiled the init + ;; value, we want the value the UI sees to be uncompiled. + ((eq keyword :default) + (put symbol 'standard-value (list value))) (t (custom-handle-keyword symbol keyword value 'custom-variable)))))) @@ -502,11 +514,9 @@ (put symbol 'custom-autoload t) (custom-add-load symbol load)) -;; This test is also in the C code of `user-variable-p'. -(defun custom-variable-p (variable) - "Return non-nil if VARIABLE is a custom variable." - (or (get variable 'standard-value) - (get variable 'custom-autoload))) +;; XEmacs; +;; #'custom-variable-p is in symbols.c, since it's called from +;; #'user-variable-p. ;;; Loading files needed to customize a symbol. ;;; This is in custom.el because menu-bar.el needs it for toggle cmds. @@ -1027,7 +1037,7 @@ (setq value (or value (get symbol 'standard-value))) (when value (put symbol 'saved-value was-in-theme) - (if (or (get 'force-value symbol) (default-boundp symbol)) + (if (or (get symbol 'force-value) (default-boundp symbol)) (funcall (or (get symbol 'custom-set) 'set-default) symbol (eval (car value))))) value)) @@ -1042,9 +1052,9 @@ This means reset VARIABLE to its value in TO-THEME." (custom-check-theme theme) - (mapcar '(lambda (arg) - (apply 'custom-theme-reset-internal arg) - (custom-push-theme 'theme-value (car arg) theme 'reset (cadr arg))) + (mapcar #'(lambda (arg) + (apply 'custom-theme-reset-internal arg) + (custom-push-theme 'theme-value (car arg) theme 'reset (cadr arg))) args)) (defun custom-reset-variables (&rest args) diff -r 71bf2c5667ba -r 66411359ce4e lisp/descr-text.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/descr-text.el Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,1306 @@ +;;; descr-text.el --- describe text mode + +;; Copyright (C) 1994, 1995, 1996, 2001, 2002, 2003, 2004, +;; 2005, 2006, 2007 Free Software Foundation, Inc. + +;; Author: Boris Goldowsky +;; Maintainer: FSF +;; Keywords: faces, i18n, Unicode, multilingual + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Describe-Text Mode. + +;;; Code: + +(eval-when-compile (require 'wid-edit)) + +(require 'hyper-apropos) + +;;; Describe-Text Utilities. + +(defun describe-text-widget (widget) + "Insert text to describe WIDGET in the current buffer." + ;; XEmacs change; use the widget function. + (widget-create 'push-button + :notify `(lambda (&rest ignore) + (widget-browse ',widget)) + :help-echo + "mouse-2, RET: browse this widget" + (symbol-name (if (symbolp widget) + widget + (car widget)))) + (widget-insert " ") + (widget-create 'info-link + :tag "Widget help" + :help-echo + "Read widget documentation" + "(widget)Top")) + +(defun describe-text-sexp (sexp) + "Insert a short description of SEXP in the current buffer." + ;; XEmacs change; use the widget functions. + (let ((pp (condition-case signal + (pp-to-string sexp) + (error (prin1-to-string signal))))) + (when (string-match "\n\\'" pp) + (setq pp (substring pp 0 (1- (length pp))))) + (if (cond ((string-match "\n" pp) + nil) + ((> (length pp) (- (window-width) (current-column))) + nil) + (t t)) + (widget-insert pp) + (widget-create 'push-button + :notify `(lambda (&rest ignore) + (with-output-to-temp-buffer + "*Pp Eval Output*" + (princ ',pp))) + :help-echo + "mouse-2, RET: pretty print value in another buffer" + "[Show]")))) + +(defun describe-property-list (properties) + "Insert a description of PROPERTIES in the current buffer. +PROPERTIES should be a list of overlay or text properties. +The `category', `face' and `font-lock-face' properties are made +into help buttons that call `describe-text-category' or +`describe-face' when pushed." + ;; Sort the properties by the size of their value. + (dolist (elt (sort (let (ret) + (while properties + (push (list (pop properties) (pop properties)) ret)) + ret) + (lambda (a b) (string< (prin1-to-string (nth 0 a) t) + (prin1-to-string (nth 0 b) t))))) + (let ((key (nth 0 elt)) + (value (nth 1 elt))) + ;; XEmacs change; use #'widget-insert, #'widget-create + (widget-insert (propertize (format " %-20s " key) + 'face 'hyper-apropos-heading)) + (cond ((eq key 'category) + (widget-create + 'push-button + :notify `(lambda (&rest ignore) + (describe-text-category ',value)) + :help-echo "mouse-2, RET: describe this category" + (symbol-name value))) + ((memq key '(face font-lock-face mouse-face)) + (widget-create + 'push-button + :notify (lexical-let + ((value-name (symbol-name value))) + (lambda (&rest ignore) + (hyper-describe-face (intern value-name)))) + :help-echo "mouse-2, RET: describe this face" + (format "%S" value))) + ((widgetp value) + (describe-text-widget value)) + (t + (describe-text-sexp value)))) + (insert "\n"))) + +;;; Describe-Text Commands. + +(defun describe-text-category (category) + "Describe a text property category." + (interactive "SCategory: ") + ; (help-setup-xref (list #'describe-text-category category) (interactive-p)) + (save-excursion + (with-output-to-temp-buffer "*Help*" + (set-buffer standard-output) + (insert "Category " (format "%S" category) ":\n\n") + (describe-property-list (symbol-plist category)) + (goto-char (point-min))))) + +;;;###autoload +(defun describe-text-properties (pos &optional output-buffer) + "Describe widgets, buttons, overlays and text properties at POS. +Interactively, describe them for the character after point. +If optional second argument OUTPUT-BUFFER is non-nil, +insert the output into that buffer, and don't initialize or clear it +otherwise." + (interactive "d") + (if (>= pos (point-max)) + (error "No character follows specified position")) + (if output-buffer + (describe-text-properties-1 pos output-buffer) + (if (not (or (text-properties-at pos) ; (overlays-at pos))) + ;; XEmacs change. + (extents-at pos))) + (message "This is plain text.") + (let ((buffer (current-buffer)) + (target-buffer "*Help*")) + (when (eq buffer (get-buffer target-buffer)) + (setq target-buffer "*Help*<2>")) + (save-excursion + (with-output-to-temp-buffer target-buffer + (set-buffer standard-output) + (setq output-buffer (current-buffer)) + (insert "Text content at position " (format "%d" pos) ":\n\n") + (with-current-buffer buffer + (describe-text-properties-1 pos output-buffer)) + (goto-char (point-min)))))))) + +(defun describe-text-properties-1 (pos output-buffer) + (let* ((properties (text-properties-at pos)) + ;; XEmacs change; extents, not overlays. + (extents (extents-at pos)) + (wid-field (get-char-property pos 'field)) + (wid-button (get-char-property pos 'button)) + (wid-doc (get-char-property pos 'widget-doc)) + ;; If button.el is not loaded, we have no buttons in the text. + ;; XEmacs change; use the #'and-fboundp, #'declare-fboundp macros. + (button (and-fboundp 'button-at (button-at pos))) + (button-type (and button + (declare-fboundp (button-type button)))) + (button-label (and button + (declare-fboundp (button-label button)))) + (widget (or wid-field wid-button wid-doc))) + (with-current-buffer output-buffer + ;; Widgets + (when (widgetp widget) + (newline) + (insert (cond (wid-field "This is an editable text area") + (wid-button "This is an active area") + (wid-doc "This is documentation text"))) + (insert " of a ") + (describe-text-widget widget) + (insert ".\n\n")) + ;; Buttons + (when (and button (not (widgetp wid-button))) + (newline) + (insert "Here is a `" (format "%S" button-type) + "' button labeled `" button-label "'.\n\n")) + ;; Overlays + (when extents + (newline) + (if (eq (length extents) 1) + (insert "There is an extent here:\n") + (insert "There are " (format "%d" (length extents)) + " overlays here:\n")) + (dolist (extent extents) + (insert " From " (format "%d" (extent-start-position extent)) + " to " (format "%d" (extent-end-position extent)) "\n") + (describe-property-list (extent-properties extent))) + (insert "\n")) + ;; Text properties + (when properties + (newline) + (insert "There are text properties here:\n") + (describe-property-list properties))))) + +(defcustom describe-char-unicodedata-file + ;; XEmacs change; initialise this by default, using Perl. + (let ((have-perl + (member-if + #'(lambda (path) + (file-exists-p (format "%s%cperl" path directory-sep-char))) + exec-path)) + installprivlib res) + (when have-perl + (setq installprivlib + (with-string-as-buffer-contents "" + (shell-command "perl -V:installprivlib" t) + ;; 1+ because buffer offsets start at one. + (delete-region 1 (1+ (length "installprivlib='"))) + ;; Delete the final newline, semicolon and quotation mark. + (delete-region (- (point-max) 3) (point-max)))) + (cond + ((file-exists-p + (setq res + (format "%s%cunicore%cUnicodeData.txt" + installprivlib directory-sep-char directory-sep-char)))) + ((file-exists-p + (setq res + (format "%s%cunicode%cUnicodeData.txt" + installprivlib directory-sep-char directory-sep-char))))) + res)) + "Location of Unicode data file. +This is the UnicodeData.txt file from the Unicode Consortium, used for +diagnostics. If it is non-nil `describe-char' will print data +looked up from it. This facility is mostly of use to people doing +multilingual development. + +This is a fairly large file, typically installed with Perl. +At the time of writing it is at the URL +`http://www.unicode.org/Public/UNIDATA/UnicodeData.txt'. + +It is possible to build a DBM or Berkeley index cache for this file, so that +it is not necessary to parse the whole file at run time. See +`unidata-initialize-unicodedata-database'. + +See also `describe-char-unihan-file' for the complementary file describing +East Asian Han characters and their associated information." + + :group 'mule + :type '(choice (const :tag "None" nil) + file)) + +;; XEmacs additions, from here until `describe-char-unicode-data' +(defcustom describe-char-use-cache t + "Whether `describe-char' should use a DBM or Berkeley DB cache. +This speeds up navigation of `describe-char-unicodedata-file', and makes +navigation of `describe-char-unihan-file' reasonable." + :group 'mule + :type '(choice (const :tag "None" nil) + file)) + +(defcustom describe-char-unihan-file nil + "Location of Unihan file. +This the Unihan.txt file from the Unicode Consortium, used for diagnostics. +If it is non-nil `describe-char' can print data looked up from it. This +facility is of use to people doing multilingual development, to those +learning Chinese or Japanese, and to a lesser extent to those learning +Korean or Vietnamese. + +This is large file, typically not installed with the operating system. At +the time of writing it is at the URL +`http://www.unicode.org/Public/UNIDATA/UniHan.txt'. + +In contrast with `describe-char-unicodedata-file', `describe-char' will not +load this entire file and parse it if it is available. It requires a +pre-initialized cache; see `unidata-initialize-unihan-database'. " + :group 'mule + :type '(choice (const :tag "None" nil) + file)) + +;; XEmacs addition +(defvar unidata-database-format + (or (and (featurep 'dbm) 'dbm) + (and (featurep 'berkeley-db) 'berkeley-db)) + "The DB format to use for the `describe-char' cache, or nil if no cache.") + +(defvar describe-char-unihan-field-descriptions + #s(hash-table test equal data + ("kAccountingNumeric" + "Value as an an accounting numeral" + "kBigFive" + "Big Five mapping (excluding ETEN, etc. extensions)" + "kCCCII" + "Hex CCCII code, for libraries in the Republic of China" + "kCNS1986" + "Hex CNS 11643-1986 mapping, for the Republic of China" + "kCNS1992" + "Hex CNS 11643-1986 mapping, for the Republic of China" + "kCangjie" + "Cangjie input code for the character" + "kCantonese" + "Cantonese pronunciation, using jyutping" + "kCheungBauer" + "Radical-stroke index, cangjie input code, \ +and Cantonese readings" + "kCheungBauerIndex" + "Index of information about this character \ +in Cheung & Bauer, 2002" + "kCihaiT" + "Lookup information for this character in the \ +Cihai dictionary ISBN 962-231-005-2." + "kCompatibilityVariant" + "Compatibility decomposition for this character" + "kCowles" + "Lookup information for this character in the \ +Cowles dictionary ISBN 962-231-005-2." + "kDaeJaweon" + "Lookup information for this character in the \ +Dae Jaweon (Korean) dictionary, 1988" + "kDefinition" + "Definition for this character in modern written Chinese" + "kEACC" + "The EACC (= CCCII, as used by the \ +US library of congress) code for this character" + "kFenn" + "Frequency information for this character from \ +Fenn's Chinese-English dictionary, 1979" + "kFennIndex" + "Lookup information for this character in \ +Fenn's Chinese-English dictionary, 1979" + "kFourCornerCode" + "Four-corner lookup code for this character" + "kFrequency" + "Frequency information from traditional \ +Chinese USENET postings" + "kGB0" "GB 2312-80 mapping, ku/ten" + "kGB1" "GB 12345-90 mapping, ku/ten" + "kGB3" "GB 7589-87 mapping, ku/ten" + "kGB5" "GB 7590-87 mapping, ku/ten" + "kGB7" "GB 8565-89 mapping, ku/ten" + ;; Identical to the previous information?! + "kGB8" "GB 8565-89 mapping, ku/ten" + "kGSR" + "Lookup information for this character in \ +Karlgern's Grammata Serica Recensa" + "kGradeLevel" + "The first grade in the HK school system \ +where knowledge of this character is expected" + "kHDZRadBreak" "Whether Hanyu Da Zidian has a radical break \ +beginning with this character" + "kHKGlyph" "Lookup information for this character in the HK \ +glyph reference, ISBN 962-949-040-4" + "kHKSCS" "Mapping to the HK Supplementary Character Set for \ +Big Five." + "kHanYu" "Character lookup information for Hanyu Da Zidian, \ +`Great Chinese Character Dictionary'" + "kHangul" "Korean pronunciation" + "kHanyuPinlu" "Pronunciation and frequency info, from Xiandai\ + Hanyu Pinlu Cidian" + "kIBMJapan" "IBM Japanese mapping" + "kIICore" "Is this character in the core East Asian \ +ideograph set from the IRG?" + "kIRGDaeJaweon" "Lookup information for this character \ +in the Dae Jaweon (Korean) dictionary" + "kIRGDaiKanwaZiten" "Lookup information for this character \ +in the Morohashi (Japanese) dictionary" + "kIRGHanyuDaZidian" "Lookup information for this character \ +in the Hanyu Da Zidian (Chinese) dictionary" + "kIRGKangXi" "Lookup information for this character \ +in the KangXi dictionary" + "kIRG_GSource" "PRC character source information" + "kIRG_HSource" "Hong Kong character source information" + "kIRG_JSource" "Japanese character source information" + "kIRG_KPSource" "Korean character source information" + "kIRG_KSource" "Republic of Korean character source\ + information" + "kIRG_TSource" "Republic of China character source \ +information" + "kIRG_USource" "Unicode (standards body) source information" + "kIRG_VSource" "Vietnamese character source information" + "kJIS0213" "JIS X 0213-2000 mapping in min,ku,ten form" + "kJapaneseKun" "Native Japanese pronunciation" + "kJapaneseOn" "Sino-Japanese pronunciation" + "kJis0" "JIS X 0208-1990 mapping in ku/ten form" + "kJis1" "JIS X 0212-1990 mapping in ku/ten form" + "kKPS0" "KPS 9566-97 mapping in hexadecimal" + "kKPS1" "KPS 10721-2000 mapping in hexadecimal" + "kKSC0" "KS X 1001:1992 (KS C 5601-1989) mapping \ +in ku/ten form" + "kKSC1" "KS X 1002:1991 (KS C 5657-1991) mapping \ +in ku/ten form" + "kKangXi" "Lookup information for this character \ +in the KangXi (Chinese) dictionary" + "kKarlgren" "Lookup information for this character \ +in Karlgren's dictionary, 1974" + "kKorean" "Pronunciation in Korean" + "kLau" "Lookup information for this character \ +in Lau's Cantonese-English dictionary" + "kMainlandTelegraph" "PRC telegraph code" + "kMandarin" "Mandarin pronunciation in Pinyin" + "kMatthews" "Lookup information for Robert Mathews' \ +Chinese-English dictionary" + "kMeyerWempe" "Lookup information for Bernard Meyer and \ +Theodore Wempe's dictionary" + ;; Identical to kIRGDaiKanwaZiten?!? + "kMorohashi" "Lookup information for this character \ +in the Morohashi (Japanese) dictionary" + "kNelson" "Lookup information for this character in \ +Nelson's Japanese-English dictionary" + "kOtherNumeric" "Esoteric numeric value" + "kPhonetic" "Phonetic index data" + "kPrimaryNumeric" "Standard numeric value" + "kPseudoGB1" "Fake GB 12345-90, for the purposes of \ +Unicode inclusion" + "kRSAdobe_Japan1_6" "Adobe-Japan1-6 information for \ +the character" + "kRSJapanese" "Radical/stroke count for Japanese" + "kRSKanWa" "Morohashi radical/stroke count" + "kRSKangXi" "KangXi radical/stroke count" + "kRSKorean" "Korean radical/stroke count" + "kRSUnicode" "Unicode radical/stroke count" + "kSBGY" "Lookup information for this character in the Song \ +Ben Guang Yun Chinese dictionary" + "kSemanticVariant" "Semantic variant character" + "kSimplifiedVariant" "Simplified variant character" + "kSpecializedSemanticVariant" "Specialized semantic variant" + "kTaiwanTelegraph" "Taiwanese telegraph code" + "kTang" "Tang dynasty pronunciation" + "kTotalStrokes" "Total number of strokes" + "kTraditionalVariant" "Traditional variant character" + "kVietnamese" "Vietnamese pronunciation" + "kXerox" "Xerox code" + "kZVariant" "Z-variant code(s)")) + "A map from symbolic Unihan field names to English-language descriptions.") + +(defun unidata-generate-database-file-name (unidata-file-name size + database-format) + "Return a filename suitable for storing the cache for UNIDATA-FILE-NAME." + (expand-file-name + (format "~%c.xemacs%c%s-%s" directory-sep-char directory-sep-char + (md5 (format "%s-%d" unidata-file-name size)) + database-format))) + +(defun unidata-initialize-unicodedata-database (unidata-file-name) + "Init the berkeley or gdbm lookup table for UNIDATA-FILE-NAME. + +The table is a (non-SQL) database with information on the file offset of +each Unicode code point described in UNIDATA-FILE-NAME. In the normal +course of events UNIDATA-FILE-NAME is the value of +`unidata-default-file-name', which see. " + (check-argument-type #'file-readable-p unidata-file-name) + (unless unidata-database-format + (error 'unimplemented "No (non-SQL) DB support available")) + (let* ((database-format unidata-database-format) + (size (eighth (file-attributes unidata-file-name))) + (database-file-name + (unidata-generate-database-file-name unidata-file-name + size database-format)) + (database-handle (open-database database-file-name database-format + nil "rw+" #o644 'no-conversion-unix)) + (coding-system-for-read 'no-conversion-unix) + (buffer-size 32768) + (offset-start 0) + (offset-end buffer-size) + (range-information (make-range-table 'start-closed-end-closed)) + (range-staging (make-hash-table :test 'equal)) + (message "Initializing UnicodeData database cache: ") + (loop-count 1) + range-startinfo) + (with-temp-buffer + (progress-feedback-with-label 'describe-char-unicodedata-file + "%s" 0 message) + (while (progn + (delete-region (point-min) (point-max)) + (insert-file-contents unidata-file-name nil + offset-start offset-end) + ;; If we've reached the end of the data, pass nil back to + ;; the while loop test. + (not (= (point-min) (point-max)))) + + (when (= buffer-size (- (point-max) (point-min))) + ;; If we're in the body of the file, and there's a trailing + ;; incomplete end-line, delete it, and adjust offset-end + ;; appropriately. + (goto-char (point-max)) + (search-backward "\n") + (forward-char) + (delete-region (point) (point-max)) + (setq offset-end (+ offset-start (- (point) (point-min))))) + + (progress-feedback-with-label 'describe-char-unicodedata-file + "%s" (truncate + (* (/ offset-start size) 100)) + (concat message + (make-string + (mod loop-count 39) ?.))) + (incf loop-count) + (goto-char (point-min)) + (while (re-search-forward + #r"^\([0-9A-F]\{4,6\}\);\([^;]*\);.*$" nil t) + (cond + ((and (> (- (match-end 2) (match-beginning 2)) 7) + (equal (substring (match-string 2) -7) + " First>")) + ;; Start of a range. Save the start info in range-staging. + (puthash (substring (match-string 2) 0 -7) + (list (string-to-int (match-string 1) 16) + (+ offset-start (1- (match-beginning 0)))) + range-staging)) + ((and (> (- (match-end 2) (match-beginning 2)) 7) + (equal (substring (match-string 2) -6) + " Last>")) + ;; End of a range. Combine with the start info, save it to the + ;; range-information range table. + (setq range-startinfo + (gethash (substring (match-string 2) 0 -6) range-staging)) + (assert range-startinfo nil + "Unexpected order for range information.") + (put-range-table + (first range-startinfo) + (string-to-int (match-string 1) 16) + (list (second range-startinfo) + (+ offset-start (1- (match-end 0)))) + range-information) + (remhash (substring (match-string 2) 0 -6) range-staging)) + (t + ;; Normal character. Save the associated information in the + ;; database directly. + (put-database (match-string 1) + (format "(%d %d)" + (+ offset-start (1- (match-beginning 0))) + (+ offset-start (1- (match-end 0)))) + database-handle)))) + (goto-char (point-min)) + (setq offset-start offset-end + offset-end (+ buffer-size offset-end)))) + ;; Save the range information as such in the database. + (put-database "range-information" + (let ((print-readably t)) + (prin1-to-string range-information)) + database-handle) + (close-database database-handle) + (progress-feedback-with-label 'describe-char-unicodedata-file + "%s" 100 message) + database-file-name)) + +(defun unidata-initialize-unihan-database (unihan-file-name) + "Init the berkeley or gdbm lookup table for UNIHAN-FILE-NAME. + +The table is a (non-SQL) database with information on the file offset of +each Unicode code point described in Unicode.org's Han character repository. +Unihan.txt (see `describe-char-unihan-file', the usual argument to this +function) is very large, and manipulating it directly can be tedious and +slow, so creating this cache makes it reasonable to display Unihan info in +the output of \\[universal-argument] \\[what-cursor-position] . " + (check-argument-type #'file-readable-p unihan-file-name) + (unless unidata-database-format + (error 'unimplemented "No (non-SQL) DB support available")) + (let* ((database-format unidata-database-format) + (size (eighth (file-attributes unihan-file-name))) + (database-file-name + (unidata-generate-database-file-name unihan-file-name + size database-format)) + (database-handle (open-database database-file-name database-format + nil "rw+" #o644 'no-conversion-unix)) + (coding-system-for-read 'no-conversion-unix) + (buffer-size 65536) + (offset-start 0) + (offset-end buffer-size) + (message "Initializing Unihan database cache: ") + (loop-count 1) + trailing-unicode leading-unicode character-start character-end) + (with-temp-buffer + (progress-feedback-with-label 'describe-char-unihan-file + "%s" 0 message) + (while (progn + (delete-region (point-min) (point-max)) + (insert-file-contents unihan-file-name nil + offset-start offset-end) + ;; If we've reached the end of the data, return nil to the + ;; while. + (not (= (point-min) (point-max)))) + + (incf loop-count) + (progress-feedback-with-label 'describe-char-unihan-file + "%s" (truncate + (* (/ offset-start size) 100)) + (concat message + (make-string + (mod loop-count 44) ?.))) + (block 'dealing-with-chars + (when (= buffer-size (- (point-max) (point-min))) + ;; If we're in the body of the file, we need to delete the + ;; character info for the last character, and set offset-end + ;; appropriately. Otherwise, we may not be able to pick where + ;; the actual description of a character ends and + ;; begins. + ;; + ;; This breaks if any single Unihan character description is + ;; greater than the buffer size in length. + (goto-char (point-max)) + (beginning-of-line) + + (when (< (- (point-max) (point)) (eval-when-compile + (length "U+ABCDEF\t"))) + ;; If the character ID of the last line may have been cut off, + ;; we need to delete all of that line here. + (delete-region (point) (point-max)) + (forward-line -1)) + + (when (looking-at "^\\(U\\+[0-9A-F]\\{4,6\\}\\)\t") + (setq trailing-unicode (match-string 1) + trailing-unicode + (format "^%s\t" (regexp-quote trailing-unicode))) + + (end-of-line) + + ;; Go back until we hit a line that doesn't start with this + ;; character info. + (while (re-search-backward trailing-unicode nil t)) + + ;; The re-search-backward failed, so point is still at the end + ;; of the last match. Move to its beginning. + (beginning-of-line) + (delete-region (point) (point-max)) + (setq offset-end (+ offset-start (- (point) (point-min)))))) + (goto-char (point-min)) + (while t + (when (= (point) (point-max)) + ;; We're at the end of this part of the file. + (return-from 'dealing-with-chars)) + + (unless (re-search-forward "^\\(U\\+[0-9A-F]\\{4,6\\}\\)\t" + nil t) + ;; We're probably in the comments at the start of the file. No + ;; need to look for character info. + (return-from 'dealing-with-chars)) + + ;; Store where the character started. + (beginning-of-line) + (setq character-start (point)) + + (setq leading-unicode + (format "^%s\t" (regexp-quote (match-string 1)))) + + ;; Loop until we get past this entry. + (while (re-search-forward leading-unicode nil t)) + + ;; Now, store the information. + (setq leading-unicode + (string-to-number (substring leading-unicode 3) 16) + leading-unicode (format "%04X" leading-unicode) + character-end (prog2 (end-of-line) (point))) + (put-database leading-unicode + (format "(%d %d)" + (+ offset-start (1- character-start)) + (+ offset-start (1- character-end))) + database-handle) + (forward-line))) + (setq offset-start offset-end + offset-end (+ buffer-size offset-end)))) + (close-database database-handle) + (progress-feedback-with-label 'describe-char-unihan-file + "%s" 100 + message) + database-file-name)) +;; End XEmacs additions. + +(defun describe-char-unicode-data (char) + "Return a list of Unicode data for unicode CHAR. +Each element is a list of a property description and the property value. +The list is null if CHAR isn't found in `describe-char-unicodedata-file'." + (when describe-char-unicodedata-file + (unless (file-exists-p describe-char-unicodedata-file) + (error 'file-error + (format "`unicodedata-file' %s not found" + describe-char-unicodedata-file))) + ;; XEmacs change; accept a character argument, use the cache if + ;; appropriate. + (when (characterp char) + (setq char (encode-char char 'ucs))) + (with-temp-buffer + (if describe-char-use-cache + ;; Use the database info. + (let ((database-handle (open-database + (unidata-generate-database-file-name + describe-char-unicodedata-file + (eighth (file-attributes + describe-char-unicodedata-file)) + unidata-database-format) + unidata-database-format + nil "r" + #o644 'no-conversion-unix)) + (coding-system-for-read 'no-conversion-unix) + key lookup) + (unless database-handle + (error 'io-error + (format "Could not open %s as a %s database" + (unidata-generate-database-file-name + describe-char-unicodedata-file + (eighth (file-attributes + describe-char-unicodedata-file)) + unidata-database-format) + unidata-database-format))) + (setq key (format "%04X" char) + lookup (get-database key database-handle)) + (if lookup + ;; Okay, we have information on that character in particular. + (progn (setq lookup (read lookup)) + (insert-file-contents describe-char-unicodedata-file nil + (first lookup) (second lookup))) + ;; No information on that character in particular. Do we have + ;; range information? If so, load and check for our desired + ;; character. + (setq lookup (get-database "range-information" database-handle) + lookup (if lookup (read lookup)) + lookup (if lookup (get-range-table char lookup))) + (when lookup + (insert-file-contents describe-char-unicodedata-file nil + (first lookup) (second lookup)))) + (close-database database-handle)) + + ;; Otherwise, insert the whole file (the FSF approach). + (set-buffer (get-buffer-create " *Unicode Data*")) + (when (zerop (buffer-size)) + ;; Don't use -literally in case of DOS line endings. + (insert-file-contents describe-char-unicodedata-file))) + + (goto-char (point-min)) + (let ((hex (format "%04X" char)) + found first last unihan-match unihan-info unihan-database-handle + (coding-system-for-read 'no-conversion-unix)) + (if (re-search-forward (concat "^" hex) nil t) + (setq found t) + ;; It's not listed explicitly. Look for ranges, e.g. CJK + ;; ideographs, and check whether it's in one of them. + (while (and (re-search-forward "^\\([^;]+\\);[^;]+First>;" nil t) + (>= char (setq first + (string-to-number (match-string 1) 16))) + (progn + (forward-line 1) + (looking-at "^\\([^;]+\\);[^;]+Last>;") + (> char + (setq last + (string-to-number (match-string 1) 16)))))) + (if (and first (>= char first) + last (<= char last)) + (setq found t))) + (if found + (let ((fields (mapcar (lambda (elt) + (if (> (length elt) 0) + elt)) + (cdr (split-string + (buffer-substring + (line-beginning-position) + (line-end-position)) + ";"))))) + ;; The length depends on whether the last field was empty. + (unless (or (= 13 (length fields)) + (= 14 (length fields))) + (error 'invalid-argument + (format "Invalid contents in %s" + describe-char-unicodedata-file))) + ;; The field names and values lists are slightly + ;; modified from Mule-UCS unidata.el. + (apply #'list + (list "Name" (let ((name (nth 0 fields))) + ;; Check for <..., First>, <..., Last> + (if (string-match "\\`\\(<[^,]+\\)," name) + (concat (match-string 1 name) ">") + name))) + (list "Category" + (cdr (assoc + (nth 1 fields) + '(("Lu" . "uppercase letter") + ("Ll" . "lowercase letter") + ("Lt" . "titlecase letter") + ("Mn" . "non-spacing mark") + ("Mc" . "spacing-combining mark") + ("Me" . "enclosing mark") + ("Nd" . "decimal digit") + ("Nl" . "letter number") + ("No" . "other number") + ("Zs" . "space separator") + ("Zl" . "line separator") + ("Zp" . "paragraph separator") + ("Cc" . "other control") + ("Cf" . "other format") + ("Cs" . "surrogate") + ("Co" . "private use") + ("Cn" . "not assigned") + ("Lm" . "modifier letter") + ("Lo" . "other letter") + ("Pc" . "connector punctuation") + ("Pd" . "dash punctuation") + ("Ps" . "open punctuation") + ("Pe" . "close punctuation") + ("Pi" . "initial-quotation punctuation") + ("Pf" . "final-quotation punctuation") + ("Po" . "other punctuation") + ("Sm" . "math symbol") + ("Sc" . "currency symbol") + ("Sk" . "modifier symbol") + ("So" . "other symbol"))))) + (list "Combining class" + (cdr (assoc + (string-to-number (nth 2 fields)) + '((0 . "Spacing") + (1 . "Overlays and interior") + (7 . "Nuktas") + (8 . "Hiragana/Katakana voicing marks") + (9 . "Viramas") + (10 . "Start of fixed position classes") + (199 . "End of fixed position classes") + (200 . "Below left attached") + (202 . "Below attached") + (204 . "Below right attached") + (208 . "Left attached (reordrant around \ +single base character)") + (210 . "Right attached") + (212 . "Above left attached") + (214 . "Above attached") + (216 . "Above right attached") + (218 . "Below left") + (220 . "Below") + (222 . "Below right") + (224 . "Left (reordrant around single base \ +character)") + (226 . "Right") + (228 . "Above left") + (230 . "Above") + (232 . "Above right") + (233 . "Double below") + (234 . "Double above") + (240 . "Below (iota subscript)"))))) + (list "Bidi category" + (cdr (assoc + (nth 3 fields) + '(("L" . "Left-to-Right") + ("LRE" . "Left-to-Right Embedding") + ("LRO" . "Left-to-Right Override") + ("R" . "Right-to-Left") + ("AL" . "Right-to-Left Arabic") + ("RLE" . "Right-to-Left Embedding") + ("RLO" . "Right-to-Left Override") + ("PDF" . "Pop Directional Format") + ("EN" . "European Number") + ("ES" . "European Number Separator") + ("ET" . "European Number Terminator") + ("AN" . "Arabic Number") + ("CS" . "Common Number Separator") + ("NSM" . "Non-Spacing Mark") + ("BN" . "Boundary Neutral") + ("B" . "Paragraph Separator") + ("S" . "Segment Separator") + ("WS" . "Whitespace") + ("ON" . "Other Neutrals"))))) + (list + "Decomposition" + (if (nth 4 fields) + (let* ((parts (split-string (nth 4 fields))) + (info (car parts))) + (if (string-match "\\`<\\(.+\\)>\\'" info) + (setq info (match-string 1 info)) + (setq info nil)) + (if info (setq parts (cdr parts))) + ;; Maybe printing ? for unrepresentable unicodes + ;; here and below should be changed? + (setq parts (mapconcat + (lambda (arg) + (string (or (decode-char + 'ucs + (string-to-number arg 16)) + ??))) + parts " ")) + (concat info parts)))) + (list "Decimal digit value" + (nth 5 fields)) + (list "Digit value" + (nth 6 fields)) + (list "Numeric value" + (nth 7 fields)) + (list "Mirrored" + (if (equal "Y" (nth 8 fields)) + "yes")) + (list "Old name" (nth 9 fields)) + (list "ISO 10646 comment" (nth 10 fields)) + (list "Uppercase" (and (nth 11 fields) + (string (or (decode-char + 'ucs + (string-to-number + (nth 11 fields) 16)) + ??)))) + (list "Lowercase" (and (nth 12 fields) + (string (or (decode-char + 'ucs + (string-to-number + (nth 12 fields) 16)) + ??)))) + (list "Titlecase" (and (nth 13 fields) + (string (or (decode-char + 'ucs + (string-to-number + (nth 13 fields) 16)) + ??)))) + + ;; XEmacs addition. + ;; If we're aware the character is a Han character, provide + ;; the Unihan information, or tell the user that it's not + ;; available. + (if (and (> (length (nth 0 fields)) 13) + (equal "= pos (point-max)) + (error "No character follows specified position")) + (let* ((char (char-after pos)) + (charset (char-charset char)) + (composition (find-composition pos nil nil t)) + (component-chars nil) + (display-table + (specifier-instance current-display-table (selected-window))) + (disp-table-entry (and display-table + (get-display-table char display-table))) + (extents (mapcar #'(lambda (o) (extent-properties o)) + (extents-at pos))) + (char-description (single-key-description char)) + (text-props-desc + (let ((tmp-buf (generate-new-buffer " *text-props*"))) + (unwind-protect + (progn + (describe-text-properties pos tmp-buf) + (with-current-buffer tmp-buf (buffer-string))) + (kill-buffer tmp-buf)))) + item-list max-width unicode unicode-formatted unicode-error + unicodedata (max-unicode-description-width (- (window-width) 50))) + + + (setq unicode-error + ;; XEmacs change, check does the character represent a Unicode + ;; error sequence. + (get-char-table char unicode-error-default-translation-table) + unicode (and (not unicode-error) (encode-char char 'ucs)) + unicode-formatted (if unicode-error + (format + "Invalid Unicode sequence, ?\x%02x on disk" + unicode-error) + (if (and unicode (natnump unicode)) + (format (if (> unicode #xFFFF) + "U+%06X" "U+%04X") + unicode) + "")) + item-list + `(("character" + ,(format "%s (%s, %d, #o%o, #x%x)" + (apply 'propertize char-description + (text-properties-at pos)) + unicode-formatted + char + char + char)) + ("charset" + ,(lexical-let + ((charset-name (symbol-name charset))) + `(progn + (widget-create 'push-button + :notify ,(lambda (&rest ignored-arg) + (with-displaying-help-buffer + (lambda nil + (charset-description + (intern charset-name))) + charset-name)) + ,charset-name) + (widget-insert (format " (%s)" (charset-description + ',charset)))))) + ("code point" + ,(let ((split (split-char char))) + `(widget-create 'push-button +; :notify +; ,(lambda (&rest ignored-arg) +; (with-selected-wind +; insert-gui-button +; (make-gui-button + ,(if (= (charset-dimension charset) 1) + (format "#x%02X" (nth 1 split)) + (format "#x%02X #x%02X" (nth 1 split) + (nth 2 split)))))) + ("syntax" + ,(let ((syntax + (syntax-string-to-code (string (syntax-after pos))))) + (with-temp-buffer + (describe-syntax-code syntax (current-buffer)) + ;; Remove the newline. + (delete-backward-char) + (buffer-string)))) + ;; XEmacs; #### add category support. +; ("category" +; ,@(let ((category-set (char-category-set char))) +; (if (not category-set) +; '("-- none --") +; (mapcar #'(lambda (x) (format "%c:%s" +; x (category-docstring x))) +; (category-set-mnemonics category-set))))) +; ,@(let ((props (get-char-table char char-code-property-table)) +; ps) +; (when props +; (while props +; (push (format "%s:" (pop props)) ps) +; (push (format "%s;" (pop props)) ps)) +; (list (cons "Properties" (nreverse ps))))) + ("to input" + ,@(let ((key-list (and-fboundp #'quail-find-key + current-input-method + (quail-find-key char)))) + (if (consp key-list) + (list "type" + (mapconcat #'(lambda (x) (concat "\"" x "\"")) + key-list " or ") + "with" + `(insert-text-button + ,current-input-method + 'type 'help-input-method + 'help-args '(,current-input-method)))))) +; ("buffer code" +; ,(encoded-string-description +; (string-as-unibyte (char-to-string char) nil)) + ("file code" + ,@(let* ((coding buffer-file-coding-system) + ;; ### XEmacs; use encode-coding-char once + ;; merged. + (encoded (encode-coding-string char coding))) + (if encoded + (list (encoded-string-description encoded coding) + (format "(encoded by coding system %S)" + (coding-system-name coding))) + (list "not encodable by coding system" + (coding-system-name coding))))) + ("display" + ,(cond + (disp-table-entry + ;; XEmacs change; just use the print syntax of the display + ;; table entry. Might be possible to improve this, but + ;; nothing occurs to me right now. + (format "by display table entry [%S] " disp-table-entry)) + (composition + (let ((from (car composition)) + (to (nth 1 composition)) + (next (1+ pos)) + (components (nth 2 composition)) + ch) + (setcar composition + (and (< from pos) (buffer-substring from pos))) + (setcar (cdr composition) + (and (< next to) (buffer-substring next to))) + (dotimes (i (length components)) + (if (integerp (setq ch (aref components i))) + (push (cons ch (describe-char-display pos ch)) + component-chars))) + (setq component-chars (nreverse component-chars)) + (format "composed to form \"%s\" (see below)" + (buffer-substring from to)))) + (t + (let ((display (describe-char-display pos char))) + (if (display-graphic-p (selected-frame)) + (if display + (concat + "by this font (glyph code)\n" + (format " %s (#x%02X)" + (first display) (second display))) + "no font available") + (if display + (format "terminal code %s" display) + "not encodable for terminal")))))) + ,@(let ((face + (if (not (or disp-table-entry composition)) + (cond + ;; XEmacs #### Implement this. +; ((and show-trailing-whitespace +; (save-excursion (goto-char pos) +; (looking-at "[ \t]+$"))) +; 'trailing-whitespace) +; ((and nobreak-char-display unicode (eq unicode '#xa0)) +; 'nobreak-space) +; ((and nobreak-char-display unicode (eq unicode '#xad)) +; 'escape-glyph) + ((and (< char 32) (not (memq char '(9 10)))) + 'escape-glyph))))) + (if face (list (list "hardcoded face" + `(insert-gui-button + (make-gui-button + ,(symbol-name face))))))) + ,@(progn + (setq unicodedata (and unicode + (describe-char-unicode-data unicode))) + (if unicodedata + (cons (list "Unicode data" " ") unicodedata))))) + (setq max-width (apply #'max (mapcar #'(lambda (x) + (if (cadr x) (length (car x)) 0)) + item-list))) + (when (and unicodedata (> max-width max-unicode-description-width)) + (setq max-width max-unicode-description-width) + (with-temp-buffer + (let ((fill-column max-unicode-description-width) + (indent-tabs-mode nil)) + (dolist (unidata-line unicodedata) + (when (cadr unidata-line) + (setf (car unidata-line) + (progn (insert (car unidata-line)) + (goto-char (point-min)) + (fill-paragraph 'right) + (delete-region (1- (point-max)) + (point-max)) + (buffer-string))) + (delete-region (point-min) (point-max))))))) + ; (help-setup-xref nil (interactive-p)) + (with-displaying-help-buffer + (lambda () + (with-current-buffer standard-output + ; (set-buffer-multibyte multibyte-p) + (let ((formatter (format "%%%ds:" max-width))) + (dolist (elt item-list) + (when (cadr elt) + (insert (format formatter (car elt))) + (dolist (clm (cdr elt)) + (if (consp clm) + (progn (insert " ") (eval clm)) + (when (>= (+ (current-column) + (or (string-match "\n" clm) + (string-width clm)) + 1) + (window-width)) + (insert "\n") + (indent-to (1+ max-width))) + (insert " " clm))) + (insert "\n")))) + + (when extents + (save-excursion + (goto-char (point-min)) + (re-search-forward "character:[ \t\n]+") + (let* ((end (+ (point) (length char-description)))) + (mapc #'(lambda (props) + (let ((o (make-extent (point) end))) + (while props + (set-extent-property o (car props) (nth 1 props)) + (setq props (cddr props))))) + extents)))) + + ;; XEmacs change; don't give GUI- or TTY-specific detail about the + ;; display table entry, the #'specifier-instance call above dealt + ;; with that. + ; (when disp-table-entry ...) + + ;; XEmacs; this doesn't work now. + (when composition + (insert "\nComposed") + (if (car composition) + (if (cadr composition) + (insert " with the surrounding characters \"" + (car composition) "\" and \"" + (cadr composition) "\"") + (insert " with the preceding character(s) \"" + (car composition) "\"")) + (if (cadr composition) + (insert " with the following character(s) \"" + (cadr composition) "\""))) + (insert " by the rule:\n\t(" + (mapconcat (lambda (x) + (format (if (consp x) "%S" "?%c") x)) + (nth 2 composition) + " ") + ")") + (insert "\nThe component character(s) are displayed by ") + ;; XEmacs #### Once composition is in place, this should be + ;; a (font-instance-name (face-font-instance [...])) call. + (if (display-graphic-p (selected-frame)) + (progn + (insert "these fonts (glyph codes):") + (dolist (elt component-chars) + (insert "\n " (car elt) ?: + (propertize " " 'display '(space :align-to 5)) + (if (cdr elt) + (format "%s (#x%02X)" (cadr elt) (cddr elt)) + "-- no font --")))) + (insert "these terminal codes:") + (dolist (elt component-chars) + (insert "\n " (car elt) ":" + (propertize " " 'display '(space :align-to 5)) + (or (cdr elt) "-- not encodable --")))) + (insert "\nSee the variable `reference-point-alist' for " + "the meaning of the rule.\n")) + + (if text-props-desc (insert text-props-desc)) +; (setq help-xref-stack-item (list 'help-insert-string (buffer-string))) + (toggle-read-only 1) + (print-help-return-message))) + (format "Describe %c <%d>" (char-after pos) pos)))) + +(defalias 'describe-char-after 'describe-char) +(make-obsolete 'describe-char-after 'describe-char "22.1") + +(provide 'descr-text) + +;; arch-tag: fc55a498-f3e9-4312-b5bd-98cc02480af1 +;;; descr-text.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/diagnose.el --- a/lisp/diagnose.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/diagnose.el Sat Oct 25 21:40:46 2008 +0900 @@ -125,14 +125,15 @@ (window-list fr t)) (frame-list)) #'window-memory-usage)) - (sort-numeric-fields -1 - (save-excursion - (goto-char begin) - (forward-line 3) - (point)) - (save-excursion - (forward-line -2) - (point))) + (when-fboundp #'sort-numeric-fields + (sort-numeric-fields -1 + (save-excursion + (goto-char begin) + (forward-line 3) + (point)) + (save-excursion + (forward-line -2) + (point)))) (princ "\n") (let ((total 0) (fmt "%-30s%10s\n")) @@ -155,14 +156,15 @@ (princ "\n") (princ (format fmt "total" total)) (incf grandtotal total)) - (sort-numeric-fields -1 - (save-excursion - (goto-char begin) - (forward-line 2) - (point)) - (save-excursion - (forward-line -2) - (point))) + (when-fboundp #'sort-numeric-fields + (sort-numeric-fields -1 + (save-excursion + (goto-char begin) + (forward-line 2) + (point)) + (save-excursion + (forward-line -2) + (point)))) (princ (format "\n\ngrand total: %s\n" grandtotal))) grandtotal)))) @@ -223,14 +225,15 @@ (princ (format fmt "total" total-count total-use-overhead)) (incf grandtotal total-use-overhead) - (sort-numeric-fields -1 - (save-excursion - (goto-char begin) - (forward-line 2) - (point)) - (save-excursion - (forward-line -2) - (point)))))) + (when-fboundp #'sort-numeric-fields + (sort-numeric-fields -1 + (save-excursion + (goto-char begin) + (forward-line 2) + (point)) + (save-excursion + (forward-line -2) + (point))))))) (with-output-to-temp-buffer buffer (save-excursion (set-buffer buffer) @@ -245,189 +248,195 @@ "Show statistics about memory usage of the new allocator." (interactive) (garbage-collect) - (let* ((stats (mc-alloc-memory-usage)) - (page-size (first stats)) - (heap-sects (second stats)) - (used-plhs (third stats)) - (free-plhs (fourth stats)) - (globals (fifth stats)) - (mc-malloced-bytes (sixth stats))) - (with-output-to-temp-buffer "*mc-alloc memory usage*" - (flet ((print-used-plhs (text plhs) - (let ((sum-n-pages 0) - (sum-used-n-cells 0) - (sum-used-space 0) - (sum-used-total 0) - (sum-total-n-cells 0) - (sum-total-space 0) - (sum-total-total 0) - (fmt "%7s%7s|%7s%9s%9s%4s|%7s%9s%9s%4s|%4s\n")) - (princ (format "%-14s|%-29s|%-29s|\n" - text - " currently in use" - " total available")) - (princ (format fmt "cell-sz" "#pages" - "#cells" "space" "total" "% " - "#cells" "space" "total" "% " "% ")) - (princ (make-string 79 ?-)) - (princ "\n") - (while plhs - (let* ((elem (car plhs)) - (cell-size (first elem)) - (n-pages (second elem)) - (used-n-cells (third elem)) - (used-space (fourth elem)) - (used-total (if (zerop cell-size) - (sixth elem) - (* cell-size used-n-cells))) - (used-eff (floor (if (not (zerop used-total)) - (* (/ (* used-space 1.0) - (* used-total 1.0)) - 100.0) - 0))) - (total-n-cells (fifth elem)) - (total-space (if (zerop cell-size) - used-space - (* cell-size total-n-cells))) - (total-total (sixth elem)) - (total-eff (floor (if (not (zerop total-total)) - (* (/ (* total-space 1.0) - (* total-total 1.0)) - 100.0) - 0))) - (eff (floor (if (not (zerop total-total)) - (* (/ (* used-space 1.0) - (* total-total 1.0)) - 100.0) - 0)))) - (princ (format fmt - cell-size n-pages used-n-cells used-space - used-total used-eff total-n-cells - total-space total-total total-eff eff)) - (incf sum-n-pages n-pages) - (incf sum-used-n-cells used-n-cells) - (incf sum-used-space used-space) - (incf sum-used-total used-total) - (incf sum-total-n-cells total-n-cells) - (incf sum-total-space total-space) - (incf sum-total-total total-total)) - (setq plhs (cdr plhs))) - (let ((avg-used-eff (floor (if (not (zerop sum-used-total)) - (* (/ (* sum-used-space 1.0) - (* sum-used-total 1.0)) - 100.0) - 0))) - (avg-total-eff (floor (if (not (zerop sum-total-total)) - (* (/ (* sum-total-space 1.0) - (* sum-total-total 1.0)) - 100.0) - 0))) - (avg-eff (floor (if (not (zerop sum-total-total)) - (* (/ (* sum-used-space 1.0) - (* sum-total-total 1.0)) - 100.0) - 0)))) - (princ (format fmt "sum " sum-n-pages sum-used-n-cells - sum-used-space sum-used-total avg-used-eff - sum-total-n-cells sum-total-space - sum-total-total avg-total-eff avg-eff)) - (princ "\n")))) + (if-fboundp #'mc-alloc-memory-usage + (let* ((stats (mc-alloc-memory-usage)) + (page-size (first stats)) + (heap-sects (second stats)) + (used-plhs (third stats)) + (free-plhs (fourth stats)) + (globals (fifth stats)) + (mc-malloced-bytes (sixth stats))) + (with-output-to-temp-buffer "*mc-alloc memory usage*" + (flet ((print-used-plhs (text plhs) + (let ((sum-n-pages 0) + (sum-used-n-cells 0) + (sum-used-space 0) + (sum-used-total 0) + (sum-total-n-cells 0) + (sum-total-space 0) + (sum-total-total 0) + (fmt "%7s%7s|%7s%9s%9s%4s|%7s%9s%9s%4s|%4s\n")) + (princ (format "%-14s|%-29s|%-29s|\n" + text + " currently in use" + " total available")) + (princ (format fmt "cell-sz" "#pages" + "#cells" "space" "total" "% " + "#cells" "space" "total" "% " "% ")) + (princ (make-string 79 ?-)) + (princ "\n") + (while plhs + (let* ((elem (car plhs)) + (cell-size (first elem)) + (n-pages (second elem)) + (used-n-cells (third elem)) + (used-space (fourth elem)) + (used-total (if (zerop cell-size) + (sixth elem) + (* cell-size used-n-cells))) + (used-eff (floor (if (not (zerop used-total)) + (* (/ (* used-space 1.0) + (* used-total 1.0)) + 100.0) + 0))) + (total-n-cells (fifth elem)) + (total-space (if (zerop cell-size) + used-space + (* cell-size total-n-cells))) + (total-total (sixth elem)) + (total-eff (floor (if (not (zerop total-total)) + (* (/ (* total-space 1.0) + (* total-total 1.0)) + 100.0) + 0))) + (eff (floor (if (not (zerop total-total)) + (* (/ (* used-space 1.0) + (* total-total 1.0)) + 100.0) + 0)))) + (princ (format fmt + cell-size n-pages used-n-cells used-space + used-total used-eff total-n-cells + total-space total-total total-eff eff)) + (incf sum-n-pages n-pages) + (incf sum-used-n-cells used-n-cells) + (incf sum-used-space used-space) + (incf sum-used-total used-total) + (incf sum-total-n-cells total-n-cells) + (incf sum-total-space total-space) + (incf sum-total-total total-total)) + (setq plhs (cdr plhs))) + (let ((avg-used-eff (floor (if (not (zerop sum-used-total)) + (* (/ (* sum-used-space 1.0) + (* sum-used-total 1.0)) + 100.0) + 0))) + (avg-total-eff (floor (if (not (zerop sum-total-total)) + (* (/ (* sum-total-space 1.0) + (* sum-total-total 1.0)) + 100.0) + 0))) + (avg-eff (floor (if (not (zerop sum-total-total)) + (* (/ (* sum-used-space 1.0) + (* sum-total-total 1.0)) + 100.0) + 0)))) + (princ (format fmt "sum " sum-n-pages sum-used-n-cells + sum-used-space sum-used-total avg-used-eff + sum-total-n-cells sum-total-space + sum-total-total avg-total-eff avg-eff)) + (princ "\n")))) - (print-free-plhs (text plhs) - (let ((sum-n-pages 0) - (sum-n-sects 0) - (sum-space 0) - (sum-total 0) - (fmt "%6s%10s |%7s%10s\n")) - (princ (format "%s\n" text)) - (princ (format fmt "#pages" "space" "#sects" "total")) - (princ (make-string 35 ?-)) - (princ "\n") - (while plhs - (let* ((elem (car plhs)) - (n-pages (first elem)) - (n-sects (second elem)) - (space (* n-pages page-size)) - (total (* n-sects space))) - (princ (format fmt n-pages space n-sects total)) - (incf sum-n-pages n-pages) - (incf sum-n-sects n-sects) - (incf sum-space space) - (incf sum-total total)) - (setq plhs (cdr plhs))) - (princ (make-string 35 ?=)) - (princ "\n") - (princ (format fmt sum-n-pages sum-space - sum-n-sects sum-total)) - (princ "\n")))) + (print-free-plhs (text plhs) + (let ((sum-n-pages 0) + (sum-n-sects 0) + (sum-space 0) + (sum-total 0) + (fmt "%6s%10s |%7s%10s\n")) + (princ (format "%s\n" text)) + (princ (format fmt "#pages" "space" "#sects" "total")) + (princ (make-string 35 ?-)) + (princ "\n") + (while plhs + (let* ((elem (car plhs)) + (n-pages (first elem)) + (n-sects (second elem)) + (space (* n-pages page-size)) + (total (* n-sects space))) + (princ (format fmt n-pages space n-sects total)) + (incf sum-n-pages n-pages) + (incf sum-n-sects n-sects) + (incf sum-space space) + (incf sum-total total)) + (setq plhs (cdr plhs))) + (princ (make-string 35 ?=)) + (princ "\n") + (princ (format fmt sum-n-pages sum-space + sum-n-sects sum-total)) + (princ "\n")))) - (princ (format "%-12s%10s\n\n" "PAGE_SIZE" page-size)) + (princ (format "%-12s%10s\n\n" "PAGE_SIZE" page-size)) - (print-used-plhs "USED HEAP" used-plhs) - (princ "\n\n") + (print-used-plhs "USED HEAP" used-plhs) + (princ "\n\n") - (print-free-plhs "FREE HEAP" free-plhs) - (princ "\n\n") + (print-free-plhs "FREE HEAP" free-plhs) + (princ "\n\n") - (let ((fmt "%-30s%10s\n")) - (princ (format fmt "heap sections" "")) - (princ (make-string 40 ?-)) - (princ "\n") - (princ (format fmt "number of heap sects" - (first heap-sects))) - (princ (format fmt "used size" (second heap-sects))) - (princ (make-string 40 ?-)) - (princ "\n") - (princ (format fmt "real size" (third heap-sects))) - (princ (format fmt "global allocator structs" globals)) - (princ (make-string 40 ?-)) - (princ "\n") - (princ (format fmt "real size + structs" - (+ (third heap-sects) globals))) - (princ "\n") - (princ (make-string 40 ?=)) - (princ "\n") - (princ (format fmt "grand total" mc-malloced-bytes))) + (let ((fmt "%-30s%10s\n")) + (princ (format fmt "heap sections" "")) + (princ (make-string 40 ?-)) + (princ "\n") + (princ (format fmt "number of heap sects" + (first heap-sects))) + (princ (format fmt "used size" (second heap-sects))) + (princ (make-string 40 ?-)) + (princ "\n") + (princ (format fmt "real size" (third heap-sects))) + (princ (format fmt "global allocator structs" globals)) + (princ (make-string 40 ?-)) + (princ "\n") + (princ (format fmt "real size + structs" + (+ (third heap-sects) globals))) + (princ "\n") + (princ (make-string 40 ?=)) + (princ "\n") + (princ (format fmt "grand total" mc-malloced-bytes))) - (+ mc-malloced-bytes))))) + (+ mc-malloced-bytes)))) + (message "mc-alloc not used in this XEmacs."))) (defun show-gc-stats () "Show statistics about garbage collection cycles." (interactive) - (let ((buffer "*garbage collection statistics*") - (plist (gc-stats)) - (fmt "%-9s %16s %12s %12s %12s %12s\n")) - (flet ((plist-get-stat (category field) - (let ((stat (plist-get plist (intern (concat category field))))) - (if stat - (format "%.0f" stat) - "-"))) - (show-stats (category) - (princ (format fmt category - (plist-get-stat category "-total") - (plist-get-stat category "-in-last-gc") - (plist-get-stat category "-in-this-gc") - (plist-get-stat category "-in-last-cycle") - (plist-get-stat category "-in-this-cycle"))))) - (with-output-to-temp-buffer buffer - (save-excursion - (set-buffer buffer) - (princ (format "%s %g\n" "Current phase" (plist-get plist 'phase))) - (princ (make-string 78 ?-)) - (princ "\n") - (princ (format fmt "stat" "total" "last-gc" "this-gc" - "last-cycle" "this-cylce")) - (princ (make-string 78 ?-)) - (princ "\n") - (show-stats "n-gc") - (show-stats "n-cycles") - (show-stats "enqueued") - (show-stats "dequeued") - (show-stats "repushed") - (show-stats "enqueued2") - (show-stats "dequeued2") - (show-stats "finalized") - (show-stats "freed") - (plist-get plist 'n-gc-total)))))) + (if-fboundp #'gc-stats + (let ((buffer "*garbage collection statistics*") + (plist (gc-stats)) + (fmt "%-9s %16s %12s %12s %12s %12s\n")) + (flet ((plist-get-stat (category field) + (let ((stat (plist-get plist + (intern (concat category field))))) + (if stat + (format "%.0f" stat) + "-"))) + (show-stats (category) + (princ (format fmt category + (plist-get-stat category "-total") + (plist-get-stat category "-in-last-gc") + (plist-get-stat category "-in-this-gc") + (plist-get-stat category "-in-last-cycle") + (plist-get-stat category "-in-this-cycle"))))) + (with-output-to-temp-buffer buffer + (save-excursion + (set-buffer buffer) + (princ (format "%s %g\n" "Current phase" + (plist-get plist 'phase))) + (princ (make-string 78 ?-)) + (princ "\n") + (princ (format fmt "stat" "total" "last-gc" "this-gc" + "last-cycle" "this-cylce")) + (princ (make-string 78 ?-)) + (princ "\n") + (show-stats "n-gc") + (show-stats "n-cycles") + (show-stats "enqueued") + (show-stats "dequeued") + (show-stats "repushed") + (show-stats "enqueued2") + (show-stats "dequeued2") + (show-stats "finalized") + (show-stats "freed") + (plist-get plist 'n-gc-total))))) + (error 'void-function "gc-stats not available."))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/disp-table.el --- a/lisp/disp-table.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/disp-table.el Sat Oct 25 21:40:46 2008 +0900 @@ -1,6 +1,6 @@ ;;; disp-table.el --- functions for dealing with char tables. -;; Copyright (C) 1987, 1994, 1997 Free Software Foundation, Inc. +;; Copyright (C) 1987, 1994, 1997, 2007 Free Software Foundation, Inc. ;; Copyright (C) 1995 Sun Microsystems. ;; Author: Howard Gayle @@ -28,56 +28,78 @@ ;;; Commentary: -;; #### Need lots of work. make-display-table depends on a value -;; that is a define in the C code. Maybe we should just move the -;; function into C. - -;; #### display-tables-as-vectors is really evil and a big pain in -;; the ass. - ;; Rewritten for XEmacs July 1995, Ben Wing. ;;; Code: +;;;###autoload +(defun make-display-table () + "Return a new, empty display table. + +This returns a generic character table; previously it returned a vector, but +that was not helpful when dealing with internationalized characters above +?\xFF. See `make-char-table' for details of character tables in general. To +write code that works with both vectors and character tables, add something +like the following to the beginning of your file, and use +`put-display-table' to set what a given character is displayed as, and +`get-display-table' to examine what that character is currently displayed +as: + +\(defun-when-void put-display-table (range value display-table) + \"Set the value for char RANGE to VALUE in DISPLAY-TABLE. \" + (if (sequencep display-table) + (aset display-table range value) + (put-char-table range value display-table))) + +\(defun-when-void get-display-table (character display-table) + \"Find value for CHARACTER in DISPLAY-TABLE. \" + (if (sequencep display-table) + (aref display-table character) + (get-char-table character display-table))) + +In this implementation, `put-display-table' and `get-display-table' are +aliases of `put-char-table' and `get-char-table' respectively, and are +always available." + (make-char-table 'generic)) + +;;;###autoload +(defalias 'put-display-table #'put-char-table) + +;;;###autoload +(defalias 'get-display-table #'get-char-table) + (defun describe-display-table (dt) "Describe the display table DT in a help buffer." (with-displaying-help-buffer (lambda () - (princ "\nCharacter display glyph sequences:\n") - (save-excursion - (let ((vector (make-vector 256 nil)) - (i 0)) - (while (< i 256) - (aset vector i (aref dt i)) - (incf i)) - ;; FSF calls `describe-vector' here, but it is so incredibly - ;; lame a function for that name that I cannot bring myself - ;; to porting it. Here is what `describe-vector' does: - (terpri) - (let ((old (aref vector 0)) - (oldpos 0) - (i 1) - str) - (while (<= i 256) - (when (or (= i 256) - (not (equal old (aref vector i)))) - (if (eq oldpos (1- i)) - (princ (format "%s\t\t%s\n" - (single-key-description (int-char oldpos)) - old)) - (setq str (format "%s - %s" - (single-key-description (int-char oldpos)) - (single-key-description (int-char (1- i))))) - (princ str) - (princ (make-string (max (- 2 (/ (length str) - tab-width)) 1) ?\t)) - (princ old) - (terpri)) - (or (= i 256) - (setq old (aref vector i) - oldpos i))) - (incf i)))))))) + (map-char-table + (lambda (range value) + (cond + ((eq range t) + (princ "\nAll characters: \n") + (princ (format " %S" value))) + ((eq 'charset (and (symbolp range) (type-of (find-charset range)))) + (princ (format "\n\nCharset %S: \n" (charset-name range))) + (princ (format " %S" value))) + ((vectorp range) + (princ (format "\n\nCharset %S, row %d \n" + (charset-name (aref value 0)) + (aref value 1))) + (princ (format " %S\n\n" value))) + ((characterp range) + (princ (format "\nCharacter U+%04X, %S: " + range (if (fboundp 'split-char) + (split-char range) + (list 'ascii (char-to-int range))))) + (princ (format " %S" value)))) + nil) dt) + (princ + "\n\nFor some of the various other glyphs that GNU Emacs uses the display +table for, see the XEmacs specifiers `truncation-glyph' , +`continuation-glyph', `control-arrow-glyph', `octal-escape-glyph' and the +others described in the docstring of `make-glyph'. \n\n")))) + ;;;###autoload (defun describe-current-display-table (&optional domain) @@ -89,21 +111,17 @@ (describe-display-table disptab) (message "No display table")))) -;;;###autoload -(defun make-display-table () - "Return a new, empty display table." - (make-vector 256 nil)) - ;; #### we need a generic frob-specifier function. ;; #### this also needs to be redone like frob-face-property. ;; Let me say one more time how much dynamic scoping sucks. -(defun frob-display-table (fdt-function fdt-locale) +;;;###autoload +(defun frob-display-table (fdt-function fdt-locale &optional tag-set) (or fdt-locale (setq fdt-locale 'global)) - (or (specifier-spec-list current-display-table fdt-locale) + (or (specifier-spec-list current-display-table fdt-locale tag-set) (add-spec-to-specifier current-display-table (make-display-table) - fdt-locale)) + fdt-locale tag-set)) (add-spec-list-to-specifier current-display-table (list (cons fdt-locale @@ -112,29 +130,44 @@ (funcall fdt-function (cdr fdt-x)) fdt-x) (cdar (specifier-spec-list current-display-table - fdt-locale))))))) + fdt-locale tag-set))))))) (defun standard-display-8bit-1 (dt l h) (while (<= l h) - (aset dt l (char-to-string l)) + (remove-char-table (int-to-char l) dt) (setq l (1+ l)))) ;;;###autoload (defun standard-display-8bit (l h &optional locale) - "Display characters in the range L to H literally." + "Display characters in the range L to H literally [sic]. + +GNU Emacs includes this function. There, `literally' has no good meaning. +Under XEmacs, this function makes characters with numeric values in the +range L to H display as themselves; that is, as ASCII, latin-iso8859-1, +latin-iso8859-2 or whatever. See `standard-display-default' for the inverse +function. " (frob-display-table (lambda (x) (standard-display-8bit-1 x l h)) locale)) (defun standard-display-default-1 (dt l h) + "Misnamed function under XEmacs. See `standard-display-default'." (while (<= l h) - (aset dt l nil) + (put-char-table (int-to-char l) (format "\\%o" l) dt) (setq l (1+ l)))) ;;;###autoload (defun standard-display-default (l h &optional locale) - "Display characters in the range L to H using the default notation." + "Display characters in the range L to H using octal escape notation. + +In the XEmacs context this function is misnamed. Under GNU Emacs, +characters in the range #xA0 to #xFF display as octal escapes unless +`standard-display-european' has been called; this function neutralizes the +effects of `standard-display-european'. Under XEmacs, those characters +normally do not display as octal escapes (this ignores hackery like +specifying the X11 font character set on non-Mule builds) and this function +sets them to display as octal escapes. " (frob-display-table (lambda (x) (standard-display-default-1 x l h)) @@ -145,12 +178,9 @@ "Display character C using printable string S." (frob-display-table (lambda (x) - (aset x c s)) + (put-char-table c s x)) locale)) - -;;; #### should frob in a 'tty locale. - ;;;###autoload (defun standard-display-g1 (c sc &optional locale) "Display character C as character SC in the g1 character set. @@ -158,11 +188,8 @@ it is meaningless for an X frame." (frob-display-table (lambda (x) - (aset x c (concat "\016" (char-to-string sc) "\017"))) - locale)) - - -;;; #### should frob in a 'tty locale. + (put-char-table c (concat "\016" (char-to-string sc) "\017") x)) + locale '(tty))) ;;;###autoload (defun standard-display-graphic (c gc &optional locale) @@ -171,37 +198,41 @@ X frame." (frob-display-table (lambda (x) - (aset x c (concat "\e(0" (char-to-string gc) "\e(B"))) - locale)) - -;;; #### should frob in a 'tty locale. -;;; #### the FSF equivalent of this makes this character be displayed -;;; in the 'underline face. There's no current way to do this with -;;; XEmacs display tables. + (put-char-table c (concat "\e(0" (char-to-string gc) "\e(B") x)) + locale '(tty))) ;;;###autoload (defun standard-display-underline (c uc &optional locale) "Display character C as character UC plus underlining." (frob-display-table (lambda (x) - (aset x c (concat "\e[4m" (char-to-string uc) "\e[m"))) + (let (glyph) + (setq glyph (make-glyph (vector 'string :data (char-to-string uc)))) + (set-glyph-face glyph 'underline) + (put-char-table c glyph x))) locale)) ;;;###autoload (defun standard-display-european (arg &optional locale) - "Toggle display of European characters encoded with ISO 8859. -When enabled, characters in the range of 160 to 255 display not -as octal escapes, but as accented characters. -With prefix argument, enable European character display iff arg is positive." + "Toggle display of European characters encoded with ISO 8859-1. +When enabled (the default), characters in the range of 160 to 255 display +as accented characters. With negative prefix argument, display characters in +that range as octal escapes. + +If you want to work in a Western European language under XEmacs, it +shouldn't be necessary to call this function--things should just work. But +it's in a sufficient number of init files that we're not in a hurry to +remove it. " (interactive "P") - (frob-display-table - (lambda (x) - (if (or (<= (prefix-numeric-value arg) 0) - (and (null arg) - (equal (aref x 160) (char-to-string 160)))) - (standard-display-default-1 x 160 255) - (standard-display-8bit-1 x 160 255))) - locale)) + (if (<= (prefix-numeric-value arg) 0) + (frob-display-table + (lambda (x) + (standard-display-default-1 x 160 255)) + locale) + (frob-display-table + (lambda (x) + (standard-display-8bit-1 x 160 255)) + locale))) (provide 'disp-table) diff -r 71bf2c5667ba -r 66411359ce4e lisp/dumped-lisp.el --- a/lisp/dumped-lisp.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/dumped-lisp.el Sat Oct 25 21:40:46 2008 +0900 @@ -33,7 +33,7 @@ "post-gc" "replace" ; match-string used in version.el. - "version.el" ; Ignore compiled-by-mistake version.elc + "version" "cl" "cl-extra" @@ -95,7 +95,6 @@ ;; (pureload "profile") "loadhist" ; Must be dumped before loaddefs is loaded ; Used by help. - "help" ;; (pureload "hyper-apropos") Soon... "files" "lib-complete" @@ -104,13 +103,14 @@ "isearch-mode" "buffer" "buff-menu" - "paths.el" ; don't get confused if paths compiled. + "paths" "lisp" "page" "register" "iso8859-1" ; This must be before any modes ; (sets standard syntax table.) - "easy-mmode" ; Added for 21.5. + "easy-mmode" ; Added for 21.5. Used by help. + "help" "easymenu" ; Added for 20.3. "lisp-mode" "text-mode" @@ -178,7 +178,6 @@ ;; All files after this can have extended characters in them. (when (featurep 'mule) '("mule/mule-category" - "mule/mule-ccl" "mule/kinsoku" )) @@ -212,10 +211,12 @@ "mule/devanagari" ; must be loaded after indian.el "mule/japanese" "mule/korean" - "mule/lao" + "mule/lao" ; sucks. "mule/latin" "mule/misc-lang" ;; "thai" #### merge thai and thai-xtis!!! + ;; #### Even better; take out thai-xtis! It's not even a + ;; standard, and no-one uses it. "mule/thai-xtis" "mule/tibetan" "mule/vietnamese" @@ -223,17 +224,6 @@ ;; Specialized language support (when (featurep 'mule) "mule/canna-leim") -;; Egg/Its is now a package -; (when (featurep '(and mule wnn)) -; '("egg-leim" "egg-kwnn-leim" "egg-cwnn-leim")) -; (when (featurep 'mule) "mule/egg-sj3-leim") -;; SKK is now a package -; (when (featurep 'mule) "mule/skk-leim") - -;; Enable Mule capability for Gnus, mail, etc... -;; Moved to sunpro-load.el - the default only for Sun. -;;(pureload "mime-setup") - ;; needs access to the charsets created by the above ;; language-specific files. (when (and (featurep 'mule) (valid-console-type-p 'mswindows)) diff -r 71bf2c5667ba -r 66411359ce4e lisp/faces.el --- a/lisp/faces.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/faces.el Sat Oct 25 21:40:46 2008 +0900 @@ -472,7 +472,9 @@ (let (matchspec) ;; get-charset signals an error if its argument doesn't have an ;; associated charset. - (setq charset (get-charset charset) + (setq charset (if-fboundp #'get-charset + (get-charset charset) + (error 'unimplemented "Charset support not available")) matchspec (cons charset nil)) (or (null (setcdr matchspec 'initial)) (face-property-matching-instance @@ -2059,29 +2061,31 @@ 'global) ;; Define some logical color names to be used when reading the pixmap files. -(if (featurep 'xpm) - (setq xpm-color-symbols - (list - '("foreground" (face-foreground 'default)) - '("background" (face-background 'default)) - '("backgroundToolBarColor" - (or - (and - (featurep 'x) - (x-get-resource "backgroundToolBarColor" - "BackgroundToolBarColor" 'string - nil nil 'warn)) +(and-boundp + 'xpm-color-symbols + (featurep 'xpm) + (setq xpm-color-symbols + (list + '("foreground" (face-foreground 'default)) + '("background" (face-background 'default)) + '("backgroundToolBarColor" + (or + (and + (featurep 'x) + (x-get-resource "backgroundToolBarColor" + "BackgroundToolBarColor" 'string + nil nil 'warn)) - (face-background 'toolbar))) - '("foregroundToolBarColor" - (or - (and - (featurep 'x) - (x-get-resource "foregroundToolBarColor" - "ForegroundToolBarColor" 'string - nil nil 'warn)) - (face-foreground 'toolbar))) - ))) + (face-background 'toolbar))) + '("foregroundToolBarColor" + (or + (and + (featurep 'x) + (x-get-resource "foregroundToolBarColor" + "ForegroundToolBarColor" 'string + nil nil 'warn)) + (face-foreground 'toolbar))) + ))) (when (featurep 'tty) (set-face-highlight-p 'bold t 'global '(default tty)) diff -r 71bf2c5667ba -r 66411359ce4e lisp/files.el --- a/lisp/files.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/files.el Sat Oct 25 21:40:46 2008 +0900 @@ -163,8 +163,8 @@ (defun normal-backup-enable-predicate (name) "Default `backup-enable-predicate' function. -Checks for files in `temporary-file-directory' or -`small-temporary-file-directory'." +Checks for files in the directory returned by `temp-directory' or specified +by `small-temporary-file-directory'." (let ((temporary-file-directory (temp-directory))) (not (or (let ((comp (compare-strings temporary-file-directory 0 nil name 0 nil))) @@ -330,9 +330,8 @@ When one transform applies, its result is final; no further transforms are tried. -The default value is set up to put the auto-save file into the -temporary directory (see the variable `temporary-file-directory') for -editing a remote file." +The default value is set up to put the auto-save file into the temporary +directory (see the function `temp-directory') for editing a remote file." :group 'auto-save :type '(repeat (list (string :tag "Regexp") (string :tag "Replacement"))) ;:version "21.1" @@ -715,6 +714,51 @@ (setq newname (expand-file-name tem (file-name-directory newname))) (setq count (1- count)))) newname)) + +(defun make-temp-file (prefix &optional dir-flag suffix) + "Create a temporary file. +The returned file name (created by appending some random characters at the +end of PREFIX, and expanding against the return value of `temp-directory' if +necessary), is guaranteed to point to a newly created empty file. You can +then use `write-region' to write new data into the file. + +If DIR-FLAG is non-nil, create a new empty directory instead of a file. + +If SUFFIX is non-nil, add that at the end of the file name. + +This function is analagous to mkstemp(3) under POSIX, avoiding the race +condition between testing for the existence of the generated filename (under +POSIX with mktemp(3), under Emacs Lisp with `make-temp-name') and creating +it." + (let ((umask (default-file-modes)) + (temporary-file-directory (temp-directory)) + file) + (unwind-protect + (progn + ;; Create temp files with strict access rights. It's easy to + ;; loosen them later, whereas it's impossible to close the + ;; time-window of loose permissions otherwise. + (set-default-file-modes #o700) + (while (condition-case () + (progn + (setq file + (make-temp-name + (expand-file-name prefix + temporary-file-directory))) + (if suffix + (setq file (concat file suffix))) + (if dir-flag + (make-directory file) + (write-region "" nil file nil 'silent nil 'excl)) + nil) + (file-already-exists t)) + ;; the file was somehow created by someone else between + ;; `make-temp-name' and `write-region', let's try again. + nil) + file) + ;; Reset the umask. + (set-default-file-modes umask)))) + (defun switch-to-other-buffer (arg) "Switch to the previous buffer. With a numeric arg, n, switch to the nth @@ -2809,8 +2853,8 @@ (put 'save-buffer-coding-system 'permanent-local t) (defun files-fetch-hook-value (hook) - (let ((localval (symbol-value hook)) - (globalval (default-value hook))) + (let ((localval (copy-list (symbol-value hook))) + (globalval (copy-list (default-value hook)))) (if (memq t localval) (setq localval (append (delq t localval) (delq t globalval)))) localval)) @@ -3473,7 +3517,7 @@ (coding-system-base buffer-file-coding-system-when-loaded) buffer-file-coding-system-when-loaded) - (not adjust-eol)))))) + (not adjust-eol) t))))) (goto-char (min opoint (point-max))) ;; Recompute the truename in case changes in symlinks ;; have changed the truename. @@ -3616,7 +3660,8 @@ (coding-system-for-read 'escape-quoted)) (erase-buffer) (insert-file-contents file-name nil) - (set-buffer-file-coding-system coding-system)) + (set-buffer-file-coding-system coding-system + nil t)) (after-find-file nil nil t) (return nil)) (diff @@ -4132,6 +4177,9 @@ file switches wildcard full-directory-p))) (t (let* ((beg (point)) + ;; on Unix, assume that ls will output in what the + ;; file-name coding system specifies + (coding-system-for-read (get-coding-system 'file-name)) (result (if wildcard ;; Run ls in the directory of the file pattern we asked for. diff -r 71bf2c5667ba -r 66411359ce4e lisp/find-paths.el --- a/lisp/find-paths.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/find-paths.el Sat Oct 25 21:40:46 2008 +0900 @@ -138,14 +138,14 @@ (defun paths-for-each-emacs-directory (func - roots suffix base + roots suffix bases &optional envvar default keep-suffix) "Iterate over directories in the XEmacs hierarchy. FUNC is a function that called for each directory, with the directory as the only argument. ROOTS must be a list of installation roots. SUFFIX is the subdirectory from there. -BASE is the base to look for. +BASEA is a list of possible bases to look for. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. @@ -157,25 +157,29 @@ (paths-file-readable-directory-p preferred-value)) (file-name-as-directory preferred-value) (while roots - (let* ((root (car roots)) - ;; installed - (path (paths-construct-emacs-directory root suffix base))) - (if (paths-file-readable-directory-p path) - (funcall func path) - ;; in-place - (if (null keep-suffix) - (let ((path (paths-construct-emacs-directory root "" base))) - (if (paths-file-readable-directory-p path) - (funcall func path)))))) + (let ((root (car roots)) + (bases bases)) + (while bases + (let* ((base (car bases)) + ;; installed + (path (paths-construct-emacs-directory root suffix base))) + (if (paths-file-readable-directory-p path) + (funcall func path) + ;; in-place + (if (null keep-suffix) + (let ((path (paths-construct-emacs-directory root "" base))) + (if (paths-file-readable-directory-p path) + (funcall func path)))))) + (setq bases (cdr bases)))) (setq roots (cdr roots)))))) (defun paths-find-emacs-directories (roots - suffix base + suffix bases &optional envvar default keep-suffix) "Find a list of directories in the XEmacs hierarchy. ROOTS must be a list of installation roots. SUFFIX is the subdirectory from there. -BASE is the base to look for. +BASES is a list of bases to look for. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. @@ -185,16 +189,16 @@ (paths-for-each-emacs-directory #'(lambda (dir) (setq l (cons dir l))) roots - suffix base + suffix bases envvar default keep-suffix) (reverse l))) -(defun paths-find-emacs-directory (roots suffix base +(defun paths-find-emacs-directory (roots suffix bases &optional envvar default keep-suffix) "Find a directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. SUFFIX is the subdirectory from there. -BASE is the base to look for. +BASES is a list of possible bases to look for. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. @@ -204,15 +208,19 @@ (paths-for-each-emacs-directory #'(lambda (dir) (throw 'gotcha dir)) roots - suffix base + suffix bases envvar default keep-suffix))) -(defun paths-for-each-site-directory (func roots base &optional envvar default) +(defun paths-for-each-site-directory (func + roots bases + arch-dependent-p + &optional envvar default) "Iterate over the site-specific directories in the XEmacs hierarchy. FUNC is a function that called for each directory, with the directory as the only argument. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value." @@ -220,45 +228,48 @@ roots (file-name-as-directory (paths-construct-path (list - "lib" + (if arch-dependent-p "lib" "share") emacs-program-name))) - base + bases envvar default)) -(defun paths-find-site-directory (roots base &optional envvar default) +(defun paths-find-site-directory (roots bases arch-dependent-p &optional envvar default) "Find a site-specific directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value." (catch 'gotcha (paths-for-each-site-directory #'(lambda (dir) (throw 'gotcha dir)) - roots base + roots bases arch-dependent-p envvar default))) -(defun paths-find-site-directories (roots base &optional envvar default) +(defun paths-find-site-directories (roots bases arch-dependent-p &optional envvar default) "Find a list of site-specific directories in the XEmacs hierarchy. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value." (let ((l '())) (paths-for-each-site-directory #'(lambda (dir) (setq l (cons dir l))) - roots base + roots bases arch-dependent-p envvar default) (reverse l))) -(defun paths-for-each-version-directory (func roots base +(defun paths-for-each-version-directory (func roots bases arch-dependent-p &optional envvar default enforce-version) "Iterate over version-specific directories in the XEmacs hierarchy. FUNC is a function that called for each directory, with the directory as the only argument. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. @@ -267,16 +278,17 @@ roots (file-name-as-directory (paths-construct-path - (list "lib" + (list (if arch-dependent-p "lib" "share") (construct-emacs-version-name)))) - base + bases envvar default)) -(defun paths-find-version-directory (roots base +(defun paths-find-version-directory (roots bases arch-dependent-p &optional envvar default enforce-version) "Find a version-specific directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. @@ -284,44 +296,45 @@ (catch 'gotcha (paths-for-each-version-directory #'(lambda (dir) (throw 'gotcha dir)) - roots base + roots bases arch-dependent-p envvar default))) -(defun paths-find-version-directories (roots base +(defun paths-find-version-directories (roots bases arch-dependent-p &optional envvar default enforce-version) "Find a list of version-specific directories in the XEmacs hierarchy. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. +ARCH-DEPENDENT-P says whether the file is architecture-specific. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value. If ENFORCE-VERSION is non-nil, the directory must contain the XEmacs version." (let ((l '())) - (paths-for-each-site-directory #'(lambda (dir) - (setq l (cons dir l))) - roots base - envvar default) + (paths-for-each-version-directory #'(lambda (dir) + (setq l (cons dir l))) + roots bases arch-dependent-p + envvar default) (reverse l))) -(defun paths-find-architecture-directory (roots base &optional envvar default) +(defun paths-find-architecture-directory (roots bases &optional envvar default) "Find an architecture-specific directory in the XEmacs hierarchy. ROOTS must be a list of installation roots. -BASE is the base to look for. +BASES is a list of possible bases to look for. ENVVAR is the name of the environment variable that might also specify the directory. DEFAULT is the preferred value." - (or - ;; from more to less specific - (paths-find-version-directory roots - (paths-construct-path - (list system-configuration base)) - envvar default) - (paths-find-version-directory roots - base - envvar) - (paths-find-version-directory roots - system-configuration - envvar))) + (paths-find-version-directory roots + ;; from more to less specific + (append + (mapcar + #'(lambda (base) + (paths-construct-path + (list system-configuration base))) + bases) + bases + (list system-configuration)) + t + envvar default)) (defun construct-emacs-version-name () "Construct a string from the raw XEmacs version number." diff -r 71bf2c5667ba -r 66411359ce4e lisp/font-lock.el --- a/lisp/font-lock.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/font-lock.el Sat Oct 25 21:40:46 2008 +0900 @@ -721,6 +721,11 @@ It is present only for horrid FSF compatibility reasons. The corresponding face should be set using `edit-faces' or the `set-face-*' functions.") +(defvar font-lock-warning-face 'font-lock-warning-face + "This variable should not be set. +It is present only for horrid FSF compatibility reasons. +The corresponding face should be set using `edit-faces' or the +`set-face-*' functions.") (defconst font-lock-face-list '(font-lock-comment-face @@ -954,7 +959,7 @@ (let ((was-compiled (eq (car font-lock-keywords) t))) ;; Bring back the user-level (uncompiled) keywords. (if was-compiled - (setq font-lock-keywords (cadr font-lock-keywords))) + (setq font-lock-keywords (cdr font-lock-keywords))) ;; Now modify or replace them. (if (eq how 'set) (setq font-lock-keywords keywords) @@ -1064,7 +1069,7 @@ (let ((was-compiled (eq (car font-lock-keywords) t))) ;; Bring back the user-level (uncompiled) keywords. (if was-compiled - (setq font-lock-keywords (cadr font-lock-keywords))) + (setq font-lock-keywords (cdr font-lock-keywords))) ;; Edit them. (setq font-lock-keywords (copy-sequence font-lock-keywords)) @@ -2026,7 +2031,10 @@ font-lock-defaults (font-lock-find-font-lock-defaults major-mode))) (keywords (font-lock-choose-keywords - (nth 0 defaults) font-lock-maximum-decoration))) + (nth 0 defaults) font-lock-maximum-decoration)) + (local (cdr (assq major-mode font-lock-keywords-alist))) + (removed-keywords + (cdr-safe (assq major-mode font-lock-removed-keywords-alist)))) ;; Keywords? (setq font-lock-keywords (if (fboundp keywords) @@ -2091,7 +2099,14 @@ ;; older way: ;; defaults not specified at all, so use `beginning-of-defun'. (setq font-lock-beginning-of-syntax-function - 'beginning-of-defun))))) + 'beginning-of-defun))) + + ;; Local fontification? + (while local + (font-lock-add-keywords nil (car (car local)) (cdr (car local))) + (setq local (cdr local))) + (when removed-keywords + (font-lock-remove-keywords nil removed-keywords)))) (setq font-lock-cache-position (make-marker)) (setq font-lock-defaults-computed t))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/font.el --- a/lisp/font.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/font.el Sat Oct 25 21:40:46 2008 +0900 @@ -49,7 +49,11 @@ mswindows-font-regexp mswindows-canonicalize-font-name mswindows-parse-font-style mswindows-construct-font-style ;; #### perhaps we should rewrite font-warn to avoid the warning - font-warn)) + ;; Eh, now I look at the code, we definitely should. + font-warn + fc-pattern-get-family fc-pattern-get-size fc-pattern-get-weight + fc-font-weight-translate-from-constant make-fc-pattern + fc-pattern-add-family fc-pattern-add-size)) (globally-declare-boundp '(global-face-data @@ -250,17 +254,17 @@ (i 0)) ;; Standard ASCII characters (while (< i 26) - (aset table (+ i ?a) (+ i ?A)) + (put-display-table (+ i ?a) (+ i ?A) table) (setq i (1+ i))) ;; Now ISO translations ;; #### FIXME what's this for?? (setq i 224) (while (< i 247) ;; Agrave - Ouml - (aset table i (- i 32)) + (put-display-table i (- i 32) table) (setq i (1+ i))) (setq i 248) (while (< i 255) ;; Oslash - Thorn - (aset table i (- i 32)) + (put-display-table i (- i 32) table) (setq i (1+ i))) table)) @@ -587,7 +591,13 @@ (let ((case-fold-search t)) (if (or (not (stringp fontname)) (not (string-match font-x-font-regexp fontname))) - (make-font) + (if (and (stringp fontname) + (string-match font-xft-font-regexp fontname)) + ;; Return an XFT font. + (xft-font-create-object fontname) + ;; It's unclear how to parse the font; return an unspecified + ;; one. + (make-font)) (let ((family nil) (size nil) (weight (match-string 1 fontname)) @@ -751,16 +761,15 @@ ;;; #### FIXME actually, this section should be fc-*, right? (defvar font-xft-font-regexp - ;; #### FIXME what the fuck?!? - (when (and (boundp 'xft-font-regexp) xft-font-regexp) - (concat "\\`" - "[^:-]*" ; optional foundry and family - ; incorrect, escaping exists - "\\(-[0-9]*\\(\\.[0-9]*\\)?\\)?" ; optional size (points) - "\\(:[^:]*\\)*" ; optional properties + (concat "\\`" + #r"\(\\-\|\\:\|\\,\|[^:-]\)*" ; optional foundry and family + ; (allows for escaped colons, + ; dashes, commas) + "\\(-[0-9]*\\(\\.[0-9]*\\)?\\)?" ; optional size (points) + "\\(:[^:]*\\)*" ; optional properties ; not necessarily key=value!! "\\'" - ))) + )) (defvar font-xft-family-mappings ;; #### FIXME this shouldn't be needed or used for Xft @@ -804,7 +813,7 @@ (pattern (fc-font-match device (fc-name-parse name))) (font-obj (make-font)) (family (fc-pattern-get-family pattern 0)) - (size (fc-pattern-get-size pattern 0)) + (size (fc-pattern-get-or-compute-size pattern 0)) (weight (fc-pattern-get-weight pattern 0))) (set-font-family font-obj (and (not (equal family 'fc-result-no-match)) diff -r 71bf2c5667ba -r 66411359ce4e lisp/fontconfig.el --- a/lisp/fontconfig.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/fontconfig.el Sat Oct 25 21:40:46 2008 +0900 @@ -350,6 +350,21 @@ (let ((pair (assoc str fc-font-name-weight-mapping-string-reverse))) (if pair (cdr pair)))) +(defun fc-pattern-get-or-compute-size (pattern id) + "Get the size from `pattern' associated with `id' or try to compute it. +Returns 'fc-result-no-match if unsucessful." + ;; Many font patterns don't have a "size" property, but do have a + ;; "dpi" and a "pixelsize" property". + (let ((maybe (fc-pattern-get-size pattern id))) + (if (not (eq maybe 'fc-result-no-match)) + maybe + (let ((dpi (fc-pattern-get-dpi pattern id)) + (pixelsize (fc-pattern-get-pixelsize pattern id))) + (if (and (numberp dpi) + (numberp pixelsize)) + (* pixelsize (/ 72 dpi)) + 'fc-result-no-match))))) + (defun fc-copy-pattern-partial (pattern attribute-list) "Return a copy of PATTERN restricted to ATTRIBUTE-LIST. @@ -481,8 +496,8 @@ (fc-list-fonts-pattern-objects device pattern objectset))) (fc-delete-duplicates (mapcar - '(lambda (pattern) - (fc-pattern-get-family pattern 0)) + #'(lambda (pattern) + (fc-pattern-get-family pattern 0)) (if filter-fun (fc-filter all-fonts filter-fun) all-fonts)))))) @@ -496,10 +511,10 @@ (if style (fc-pattern-add-style pattern style)) (mapcar - '(lambda (pattern) - (let ((fc-weight-constant (fc-pattern-get-weight pattern 0))) - (if fc-weight-constant - (fc-font-weight-translate-from-constant fc-weight-constant)))) + #'(lambda (pattern) + (let ((fc-weight-constant (fc-pattern-get-weight pattern 0))) + (if fc-weight-constant + (fc-font-weight-translate-from-constant fc-weight-constant)))) (fc-list-fonts-pattern-objects device pattern objectset)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff -r 71bf2c5667ba -r 66411359ce4e lisp/frame.el --- a/lisp/frame.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/frame.el Sat Oct 25 21:40:46 2008 +0900 @@ -793,13 +793,9 @@ (let ((frame (selected-frame))) (while (> arg 0) (setq frame (next-frame frame 'visible-nomini)) - (while (not (eq (frame-visible-p frame) t)) - (setq frame (next-frame frame 'visible-nomini))) (setq arg (1- arg))) (while (< arg 0) (setq frame (previous-frame frame 'visible-nomini)) - (while (not (eq (frame-visible-p frame) t)) - (setq frame (previous-frame frame 'visible-nomini))) (setq arg (1+ arg))) (select-frame-set-input-focus frame))) @@ -1854,6 +1850,8 @@ :type 'number :group 'frames) +;; See also #'temp-buffer-resize-mode in help.el. + (defun show-temp-buffer-in-current-frame (buffer) "For use as the value of `temp-buffer-show-function': always displays the buffer in the selected frame, regardless of the behavior diff -r 71bf2c5667ba -r 66411359ce4e lisp/glyphs.el --- a/lisp/glyphs.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/glyphs.el Sat Oct 25 21:40:46 2008 +0900 @@ -2,6 +2,7 @@ ;; Copyright (C) 1994, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1995, 1996, 2000, 2005 Ben Wing. +;; Copyright (C) 2007 Didier Verna ;; Author: Chuck Thompson , Ben Wing ;; Maintainer: XEmacs Development Team @@ -1188,20 +1189,27 @@ ("" [nothing])))) ;; #### this should really be formatted-string, not string but we ;; don't have it implemented yet - ;; - ;; #define could also mean a bitmap as well as a version 1 XPM. Who - ;; cares. We don't want the file contents getting converted to a - ;; string in either case which is why the entry is there. (if (featurep 'tty) (progn (set-console-type-image-conversion-list 'tty - '(("^#define" [string :data "[xpm]"]) - ("\\`X-Face:" [string :data "[xface]"]) + '(("\\.xpm\\'" [string :data nil] 2) + ("\\.xbm\\'" [string :data nil] 2) + ;; #define could also mean a bitmap as well as a version 1 XPM. Who + ;; cares. + ("^#define" [string :data "[xpm]"]) ("\\`/\\* XPM \\*/" [string :data "[xpm]"]) - ("\\`GIF87" [string :data "[gif]"]) + ("\\`X-Face:" [string :data "[xface]"]) + ("\\.gif\\'" [string :data nil] 2) + ("\\`GIF8[79]" [string :data "[gif]"]) + ("\\.jpe?g\\'" [string :data nil] 2) ("\\`\377\330\340\000\020JFIF" [string :data "[jpeg]"]) - ("" [string :data nil] 2) + ;; all of the JFIF-format JPEG's that I've seen begin with + ;; the following. I have no idea if this is standard. + ("\\`\377\330\377\340\000\020JFIF" [string :data "[jpeg]"]) + ("\\.png\\'" [string :data nil] 2) + ("\\`\211PNG" [string :data "[png]"]) + ("" [string :data nil] 2) ;; this last one is here for pointers and icons and such -- ;; strings are not allowed so they will be ignored. ("" [nothing]))) @@ -1218,6 +1226,10 @@ ;; because it has a built-in bitmap (set-glyph-image hscroll-glyph "$" 'global 'tty))) + ;; For streams, we don't want images at all -- dvl + (set-console-type-image-conversion-list 'stream '(("" [nothing]))) + + (set-glyph-image octal-escape-glyph "\\") (set-glyph-image control-arrow-glyph "^") (set-glyph-image invisible-text-glyph " ...") diff -r 71bf2c5667ba -r 66411359ce4e lisp/gnuserv.el --- a/lisp/gnuserv.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/gnuserv.el Sat Oct 25 21:40:46 2008 +0900 @@ -214,7 +214,7 @@ :group 'gnuserv) (defcustom gnuserv-temp-file-regexp - (concat "^" (temp-directory) "/Re\\|/draft$") + (concat "^" (regexp-quote (temp-directory)) "/Re\\|/draft$") "*Regexp which should match filenames of temporary files deleted and reused by the programs that invoke the Emacs server." :type 'regexp diff -r 71bf2c5667ba -r 66411359ce4e lisp/gtk-font-menu.el --- a/lisp/gtk-font-menu.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/gtk-font-menu.el Sat Oct 25 21:40:46 2008 +0900 @@ -92,10 +92,9 @@ ;; #### - this should implement a `menus-only' option, which would ;; recalculate the menus from the cache w/o having to do font-list again. (unless gtk-font-regexp-ascii - (setq gtk-font-regexp-ascii (if (featurep 'mule) - (declare-fboundp - (charset-registry 'ascii)) - "iso8859-1"))) + (setq gtk-font-regexp-ascii (if-fboundp #'charset-registries + (aref (charset-registries 'ascii) 0) + "iso8859-1"))) (setq gtk-font-menu-registry-encoding (if (featurep 'mule) "*-*" "iso8859-1")) (let ((case-fold-search t) diff -r 71bf2c5667ba -r 66411359ce4e lisp/gtk-init.el --- a/lisp/gtk-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/gtk-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -24,15 +24,19 @@ ;; Boston, MA 02111-1307, USA. (globally-declare-boundp - '(gtk-initial-argv-list - gtk-initial-geometry)) + '(gtk-initial-argv-list gtk-initial-geometry)) (globally-declare-fboundp '(gtk-keysym-on-keyboard-p)) -(defvar gtk-win-initted nil) -(defvar gtk-pre-win-initted nil) -(defvar gtk-post-win-initted nil) +(defvar gtk-early-lisp-options-file "~/.xemacs/gtk-options.el" + "Path where GTK-specific early options should be stored. + +This allows the user to set initial geometry without using GNOME and session +management, and, since it is read before GTK is initialized, it avoids +window flicker on resizing. + +It is normally not useful to change without recompiling XEmacs.") (defvar gtk-command-switch-alist '( @@ -66,27 +70,51 @@ ("--sm-disable" . t) ) - "An assoc list of command line arguments that should in gtk-initial-argv-list. -This is necessary because GTK and GNOME consider it a fatal error if they receive -unknown command line arguments (perfectly reasonable). But this means that if -the user specifies a file name on the command line they will be unable to start. -So we filter the command line and allow only items in this list in. + "An assoc list of command line args that should be in gtk-initial-argv-list. +This is necessary because GTK and GNOME consider it a fatal error if they +receive unknown command line arguments (perfectly reasonable). But this +means that if the user specifies a file name on the command line they will +be unable to start. So we filter the command line and allow only items in +this list in. + +The CDR of the assoc list is whether it accepts an argument. For the +moment, all options are in GNU long form.") + +(defvar make-device-early-gtk-entry-point-called-p nil + "Whether `make-device-early-gtk-entry-point' has been called, at least once. + +Much of the GTK-specific Lisp init code should only be called the first time +a GTK device is created; this variable allows for that.") -The CDR of the assoc list is whether it accepts an argument. All options are in -GNU long form though.") +(defvar make-device-late-gtk-entry-point-called-p nil + "Whether `make-device-late-gtk-entry-point' has been called, at least once. + +Much of the GTK-specific Lisp init code should only be called the first time +a GTK device is created; this variable allows for that.") -(defun init-pre-gtk-win () - "Initialize Gtk GUI at startup (pre). Don't call this." - (when (not gtk-pre-win-initted) - (setq initial-frame-plist (if initial-frame-unmapped-p - '(initially-unmapped t) - nil) - gtk-pre-win-initted t))) +(defun make-device-early-gtk-entry-point () + "Entry point to set up the Lisp environment before GTK device creation." + (unless make-device-early-gtk-entry-point-called-p + (setq initial-frame-plist + (and initial-frame-unmapped-p '(initially-unmapped t)) + gtk-initial-argv-list + (cons (car command-line-args) (gtk-filter-arguments)) + gtk-initial-geometry + (nth 1 (member "-geometry" command-line-args-left)) + make-device-early-gtk-entry-point-called-p t) + (unless vanilla-inhibiting + (load gtk-early-lisp-options-file t t t)))) (defun gtk-init-handle-geometry (arg) "Set up initial geometry info for GTK devices." (setq gtk-initial-geometry (pop command-line-args-left))) +(defun make-device-late-gtk-entry-point (device) + "Entry-Point to do any Lisp-level GTK device-specific initialization." + (gtk-initialize-compose device) + (unless make-device-late-gtk-entry-point-called-p + (setq make-device-late-gtk-entry-point-called-p t))) + (defun gtk-filter-arguments () (let ((accepted nil) (rejected nil) @@ -121,85 +149,15 @@ (setq command-line-args-left (nreverse rejected)) (nreverse accepted))) -(defun init-gtk-win () - "Initialize Gtk GUI at startup. Don't call this." - (unless gtk-win-initted - (init-pre-gtk-win) - (setq gtk-initial-argv-list (cons (car command-line-args) (gtk-filter-arguments)) - gtk-initial-geometry (nth 1 (member "-geometry" command-line-args-left))) - (make-gtk-device) - (init-post-gtk-win) - (setq gtk-win-initted t))) - -(defun init-post-gtk-win () - (unless gtk-post-win-initted - (when (featurep 'mule) - (define-specifier-tag 'mule-fonts - (lambda (device) (eq 'gtk (device-type device)))) - (set-face-font - 'default - '("-*-fixed-medium-r-*--16-*-iso8859-1" - "-*-fixed-medium-r-*--*-iso8859-1" - "-*-fixed-medium-r-*--*-iso8859-2" - "-*-fixed-medium-r-*--*-iso8859-3" - "-*-fixed-medium-r-*--*-iso8859-4" - "-*-fixed-medium-r-*--*-iso8859-7" - "-*-fixed-medium-r-*--*-iso8859-8" - "-*-fixed-medium-r-*--*-iso8859-5" - "-*-fixed-medium-r-*--*-iso8859-9" - - ;; Following 3 fonts proposed by Teruhiko.Kurosaka@Japan.eng.sun - "-sun-gothic-medium-r-normal--14-120-75-75-c-60-jisx0201.1976-0" - "-sun-gothic-medium-r-normal--14-120-75-75-c-120-jisx0208.1983-0" - "-wadalab-gothic-medium-r-normal--14-120-75-75-c-120-jisx0212.1990-0" - ;; Other Japanese fonts - "-*-fixed-medium-r-*--*-jisx0201.1976-*" - "-*-fixed-medium-r-*--*-jisx0208.1983-*" - "-*-fixed-medium-r-*--*-jisx0212*-*" - - ;; Chinese fonts - "-*-*-medium-r-*--*-gb2312.1980-*" - - ;; Use One font specification for CNS chinese - ;; Too many variations in font naming - "-*-fixed-medium-r-*--*-cns11643*-*" - ;; "-*-fixed-medium-r-*--*-cns11643*2" - ;; "-*-fixed-medium-r-*--*-cns11643*3" - ;; "-*-fixed-medium-r-*--*-cns11643*4" - ;; "-*-fixed-medium-r-*--*-cns11643.5-0" - ;; "-*-fixed-medium-r-*--*-cns11643.6-0" - ;; "-*-fixed-medium-r-*--*-cns11643.7-0" - - "-*-fixed-medium-r-*--*-big5*-*" - "-*-fixed-medium-r-*--*-sisheng_cwnn-0" - - ;; Other fonts - - ;; "-*-fixed-medium-r-*--*-viscii1.1-1" - - ;; "-*-fixed-medium-r-*--*-mulearabic-0" - ;; "-*-fixed-medium-r-*--*-mulearabic-1" - ;; "-*-fixed-medium-r-*--*-mulearabic-2" - - ;; "-*-fixed-medium-r-*--*-muleipa-1" - ;; "-*-fixed-medium-r-*--*-ethio-*" - - "-*-mincho-medium-r-*--*-ksc5601.1987-*" ; Korean - "-*-fixed-medium-r-*--*-tis620.2529-1" ; Thai - ) - 'global '(mule-fonts) 'append)) - - (setq gtk-post-win-initted t))) - (push '("-geometry" . gtk-init-handle-geometry) command-switch-alist) ;;; Stuff to get compose keys working on GTK (eval-when-compile - (defmacro gtk-define-dead-key (key map) - `(when (gtk-keysym-on-keyboard-p ',key) + (defmacro gtk-define-dead-key (key map device) + `(when (gtk-keysym-on-keyboard-p ',key device) (define-key function-key-map [,key] ',map)))) -(defun gtk-initialize-compose () +(defun gtk-initialize-compose (device) "Enable compose processing" (autoload 'compose-map "gtk-compose" nil t 'keymap) (autoload 'compose-acute-map "gtk-compose" nil t 'keymap) @@ -209,7 +167,7 @@ (autoload 'compose-circumflex-map "gtk-compose" nil t 'keymap) (autoload 'compose-tilde-map "gtk-compose" nil t 'keymap) - (when (gtk-keysym-on-keyboard-p 'multi-key) + (when (gtk-keysym-on-keyboard-p 'multi-key device) (define-key function-key-map [multi-key] 'compose-map)) ;; The dead keys might really be called just about anything, depending @@ -228,93 +186,85 @@ ;; mixed up view of what these keys should be called. ;; Canonical names: - (gtk-define-dead-key acute compose-acute-map) - (gtk-define-dead-key grave compose-grave-map) - (gtk-define-dead-key cedilla compose-cedilla-map) - (gtk-define-dead-key diaeresis compose-diaeresis-map) - (gtk-define-dead-key circumflex compose-circumflex-map) - (gtk-define-dead-key tilde compose-tilde-map) - (gtk-define-dead-key degree compose-ring-map) + (gtk-define-dead-key acute compose-acute-map device) + (gtk-define-dead-key grave compose-grave-map device) + (gtk-define-dead-key cedilla compose-cedilla-map device) + (gtk-define-dead-key diaeresis compose-diaeresis-map device) + (gtk-define-dead-key circumflex compose-circumflex-map device) + (gtk-define-dead-key tilde compose-tilde-map device) + (gtk-define-dead-key degree compose-ring-map device) ;; Sun according to MIT: - (gtk-define-dead-key SunFA_Acute compose-acute-map) - (gtk-define-dead-key SunFA_Grave compose-grave-map) - (gtk-define-dead-key SunFA_Cedilla compose-cedilla-map) - (gtk-define-dead-key SunFA_Diaeresis compose-diaeresis-map) - (gtk-define-dead-key SunFA_Circum compose-circumflex-map) - (gtk-define-dead-key SunFA_Tilde compose-tilde-map) + (gtk-define-dead-key SunFA_Acute compose-acute-map device) + (gtk-define-dead-key SunFA_Grave compose-grave-map device) + (gtk-define-dead-key SunFA_Cedilla compose-cedilla-map device) + (gtk-define-dead-key SunFA_Diaeresis compose-diaeresis-map device) + (gtk-define-dead-key SunFA_Circum compose-circumflex-map device) + (gtk-define-dead-key SunFA_Tilde compose-tilde-map device) ;; Sun according to OpenWindows 2: - (gtk-define-dead-key Dead_Grave compose-grave-map) - (gtk-define-dead-key Dead_Circum compose-circumflex-map) - (gtk-define-dead-key Dead_Tilde compose-tilde-map) + (gtk-define-dead-key Dead_Grave compose-grave-map device) + (gtk-define-dead-key Dead_Circum compose-circumflex-map device) + (gtk-define-dead-key Dead_Tilde compose-tilde-map device) ;; Sun according to OpenWindows 3: - (gtk-define-dead-key SunXK_FA_Acute compose-acute-map) - (gtk-define-dead-key SunXK_FA_Grave compose-grave-map) - (gtk-define-dead-key SunXK_FA_Cedilla compose-cedilla-map) - (gtk-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map) - (gtk-define-dead-key SunXK_FA_Circum compose-circumflex-map) - (gtk-define-dead-key SunXK_FA_Tilde compose-tilde-map) + (gtk-define-dead-key SunXK_FA_Acute compose-acute-map device) + (gtk-define-dead-key SunXK_FA_Grave compose-grave-map device) + (gtk-define-dead-key SunXK_FA_Cedilla compose-cedilla-map device) + (gtk-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map device) + (gtk-define-dead-key SunXK_FA_Circum compose-circumflex-map device) + (gtk-define-dead-key SunXK_FA_Tilde compose-tilde-map device) ;; DEC according to MIT: - (gtk-define-dead-key Dacute_accent compose-acute-map) - (gtk-define-dead-key Dgrave_accent compose-grave-map) - (gtk-define-dead-key Dcedilla_accent compose-cedilla-map) - (gtk-define-dead-key Dcircumflex_accent compose-circumflex-map) - (gtk-define-dead-key Dtilde compose-tilde-map) - (gtk-define-dead-key Dring_accent compose-ring-map) + (gtk-define-dead-key Dacute_accent compose-acute-map device) + (gtk-define-dead-key Dgrave_accent compose-grave-map device) + (gtk-define-dead-key Dcedilla_accent compose-cedilla-map device) + (gtk-define-dead-key Dcircumflex_accent compose-circumflex-map device) + (gtk-define-dead-key Dtilde compose-tilde-map device) + (gtk-define-dead-key Dring_accent compose-ring-map device) ;; DEC according to OpenWindows 3: - (gtk-define-dead-key DXK_acute_accent compose-acute-map) - (gtk-define-dead-key DXK_grave_accent compose-grave-map) - (gtk-define-dead-key DXK_cedilla_accent compose-cedilla-map) - (gtk-define-dead-key DXK_circumflex_accent compose-circumflex-map) - (gtk-define-dead-key DXK_tilde compose-tilde-map) - (gtk-define-dead-key DXK_ring_accent compose-ring-map) + (gtk-define-dead-key DXK_acute_accent compose-acute-map device) + (gtk-define-dead-key DXK_grave_accent compose-grave-map device) + (gtk-define-dead-key DXK_cedilla_accent compose-cedilla-map device) + (gtk-define-dead-key DXK_circumflex_accent compose-circumflex-map device) + (gtk-define-dead-key DXK_tilde compose-tilde-map device) + (gtk-define-dead-key DXK_ring_accent compose-ring-map device) ;; HP according to MIT: - (gtk-define-dead-key hpmute_acute compose-acute-map) - (gtk-define-dead-key hpmute_grave compose-grave-map) - (gtk-define-dead-key hpmute_diaeresis compose-diaeresis-map) - (gtk-define-dead-key hpmute_asciicircum compose-circumflex-map) - (gtk-define-dead-key hpmute_asciitilde compose-tilde-map) + (gtk-define-dead-key hpmute_acute compose-acute-map device) + (gtk-define-dead-key hpmute_grave compose-grave-map device) + (gtk-define-dead-key hpmute_diaeresis compose-diaeresis-map device) + (gtk-define-dead-key hpmute_asciicircum compose-circumflex-map device) + (gtk-define-dead-key hpmute_asciitilde compose-tilde-map device) ;; Empirically discovered on Linux XFree86 MetroX: - (gtk-define-dead-key usldead_acute compose-acute-map) - (gtk-define-dead-key usldead_grave compose-grave-map) - (gtk-define-dead-key usldead_diaeresis compose-diaeresis-map) - (gtk-define-dead-key usldead_asciicircum compose-circumflex-map) - (gtk-define-dead-key usldead_asciitilde compose-tilde-map) + (gtk-define-dead-key usldead_acute compose-acute-map device) + (gtk-define-dead-key usldead_grave compose-grave-map device) + (gtk-define-dead-key usldead_diaeresis compose-diaeresis-map device) + (gtk-define-dead-key usldead_asciicircum compose-circumflex-map device) + (gtk-define-dead-key usldead_asciitilde compose-tilde-map device) ;; HP according to OpenWindows 3: - (gtk-define-dead-key hpXK_mute_acute compose-acute-map) - (gtk-define-dead-key hpXK_mute_grave compose-grave-map) - (gtk-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map) - (gtk-define-dead-key hpXK_mute_asciicircum compose-circumflex-map) - (gtk-define-dead-key hpXK_mute_asciitilde compose-tilde-map) + (gtk-define-dead-key hpXK_mute_acute compose-acute-map device) + (gtk-define-dead-key hpXK_mute_grave compose-grave-map device) + (gtk-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map device) + (gtk-define-dead-key hpXK_mute_asciicircum compose-circumflex-map device) + (gtk-define-dead-key hpXK_mute_asciitilde compose-tilde-map device) ;; HP according to HP-UX 8.0: - (gtk-define-dead-key XK_mute_acute compose-acute-map) - (gtk-define-dead-key XK_mute_grave compose-grave-map) - (gtk-define-dead-key XK_mute_diaeresis compose-diaeresis-map) - (gtk-define-dead-key XK_mute_asciicircum compose-circumflex-map) - (gtk-define-dead-key XK_mute_asciitilde compose-tilde-map) + (gtk-define-dead-key XK_mute_acute compose-acute-map device) + (gtk-define-dead-key XK_mute_grave compose-grave-map device) + (gtk-define-dead-key XK_mute_diaeresis compose-diaeresis-map device) + (gtk-define-dead-key XK_mute_asciicircum compose-circumflex-map device) + (gtk-define-dead-key XK_mute_asciitilde compose-tilde-map device) ;; Xfree86 seems to use lower case and a hyphen - (gtk-define-dead-key dead-acute compose-acute-map) - (gtk-define-dead-key dead-grave compose-grave-map) - (gtk-define-dead-key dead-cedilla compose-cedilla-map) - (gtk-define-dead-key dead-diaeresis compose-diaeresis-map) - (gtk-define-dead-key dead-circum compose-circumflex-map) - (gtk-define-dead-key dead-circumflex compose-circumflex-map) - (gtk-define-dead-key dead-tilde compose-tilde-map) - ) + (gtk-define-dead-key dead-acute compose-acute-map device) + (gtk-define-dead-key dead-grave compose-grave-map device) + (gtk-define-dead-key dead-cedilla compose-cedilla-map device) + (gtk-define-dead-key dead-diaeresis compose-diaeresis-map device) + (gtk-define-dead-key dead-circum compose-circumflex-map device) + (gtk-define-dead-key dead-circumflex compose-circumflex-map device) + (gtk-define-dead-key dead-tilde compose-tilde-map device)) -(when (featurep 'gtk) - (add-hook - 'create-console-hook - (lambda (console) - (letf (((selected-console) console)) - (when (eq 'gtk (console-type console)) - (gtk-initialize-compose)))))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/gtk-iso8859-1.el --- a/lisp/gtk-iso8859-1.el Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -;; We can just cheat and use the same code that X does. - -(setq character-set-property 'x-iso8859/1) ; see x-iso8859-1.el -(require 'x-iso8859-1) -(provide 'gtk-iso8859-1) diff -r 71bf2c5667ba -r 66411359ce4e lisp/gtk.el --- a/lisp/gtk.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/gtk.el Sat Oct 25 21:40:46 2008 +0900 @@ -1,5 +1,8 @@ (globally-declare-fboundp - '(gtk-import-function-internal gtk-call-function gtk-type-name)) + '(gtk-import-function-internal + gtk-call-function + gtk-type-name + gtk-import-function)) (globally-declare-boundp '(gtk-enumeration-info)) diff -r 71bf2c5667ba -r 66411359ce4e lisp/help.el --- a/lisp/help.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/help.el Sat Oct 25 21:40:46 2008 +0900 @@ -829,16 +829,13 @@ (defun describe-installation () "Display a buffer showing information about this XEmacs was compiled." (interactive) - (if (and (boundp 'Installation-string) - (stringp Installation-string)) + (if (and-boundp 'Installation-string + (stringp Installation-string)) (with-displaying-help-buffer (lambda () - (princ - (if (fboundp 'decode-coding-string) - (decode-coding-string Installation-string 'automatic-conversion) - Installation-string))) + (princ Installation-string)) "Installation") - (error "No Installation information available."))) + (error 'unimplemented "No Installation information available."))) (defun view-emacs-news () "Display info on recent changes to XEmacs." @@ -1293,13 +1290,15 @@ (defvar help-symbol-function-context-menu '(["View %_Documentation" (help-symbol-run-function 'describe-function)] - ["Find %_Function Source" (help-symbol-run-function 'find-function)] + ["Find %_Function Source" (help-symbol-run-function 'find-function) + (fboundp #'find-function)] ["Find %_Tag" (help-symbol-run-function 'find-tag)] )) (defvar help-symbol-variable-context-menu '(["View %_Documentation" (help-symbol-run-function 'describe-variable)] - ["Find %_Variable Source" (help-symbol-run-function 'find-variable)] + ["Find %_Variable Source" (help-symbol-run-function 'find-variable) + (fboundp #'find-variable)] ["Find %_Tag" (help-symbol-run-function 'find-tag)] )) @@ -1308,8 +1307,10 @@ 'describe-function)] ["View Variable D%_ocumentation" (help-symbol-run-function 'describe-variable)] - ["Find %_Function Source" (help-symbol-run-function 'find-function)] - ["Find %_Variable Source" (help-symbol-run-function 'find-variable)] + ["Find %_Function Source" (help-symbol-run-function 'find-function) + (fboundp #'find-function)] + ["Find %_Variable Source" (help-symbol-run-function 'find-variable) + (fboundp #'find-variable)] ["Find %_Tag" (help-symbol-run-function 'find-tag)] )) @@ -1423,8 +1424,6 @@ (t nil))) (princ "\n") - (if autoload-file - (princ (format " -- autoloads from \"%s\"\n" autoload-file))) (or file-name (setq file-name (symbol-file function))) (when file-name @@ -1483,7 +1482,53 @@ (goto-char newp standard-output)) (unless (or (equal doc "") (eq ?\n (aref doc (1- (length doc))))) - (terpri))))))))) + (terpri))) + (when (commandp function) + (princ "\nInvoked with:\n") + (let ((global-binding + (where-is-internal function global-map)) + (global-tty-binding + (where-is-internal function global-tty-map)) + (global-window-system-binding + (where-is-internal function global-window-system-map))) + (if (or global-binding global-tty-binding + global-window-system-binding) + (if (and (equal global-binding + global-tty-binding) + (equal global-binding + global-window-system-binding)) + (princ + (substitute-command-keys + (format "\n\\[%s]" function))) + (when (and global-window-system-binding + (not (equal global-window-system-binding + global-binding))) + (princ + (format + "\n%s\n -- under window systems\n" + (mapconcat #'key-description + global-window-system-binding + ", ")))) + (when (and global-tty-binding + (not (equal global-tty-binding + global-binding))) + (princ + (format + "\n%s\n -- under TTYs\n" + (mapconcat #'key-description + global-tty-binding + ", ")))) + (when global-binding + (princ + (format + "\n%s\n -- generally (that is, unless\ + overridden by TTY- or + window-system-specific mappings)\n" + (mapconcat #'key-description + global-binding + ", "))))) + (princ (substitute-command-keys + (format "\n\\[%s]" function)))))))))))) ;;; [Obnoxious, whining people who complain very LOUDLY on Usenet ;;; are binding this to keys.] @@ -1809,12 +1854,14 @@ "Follow any cross reference to source code; if none, scroll up. " (interactive "d") (let ((e (extent-at pos nil 'find-function-symbol))) - (if e - (find-function (extent-property e 'find-function-symbol)) + (if (and-fboundp #'find-function e) + (with-fboundp #'find-function + (find-function (extent-property e 'find-function-symbol))) (setq e (extent-at pos nil 'find-variable-symbol)) - (if e - (find-variable (extent-property e 'find-variable-symbol)) - (view-scroll-lines-up 1))))) + (if (and-fboundp #'find-variable e) + (with-fboundp #'find-variable + (find-variable (extent-property e 'find-variable-symbol))) + (scroll-up 1))))) (defun help-mouse-find-source-or-track (event) "Follow any cross reference to source code under the mouse; @@ -1822,11 +1869,30 @@ (interactive "e") (mouse-set-point event) (let ((e (extent-at (point) nil 'find-function-symbol))) - (if e - (find-function (extent-property e 'find-function-symbol)) + (if (and-fboundp #'find-function e) + (with-fboundp #'find-function + (find-function (extent-property e 'find-function-symbol))) (setq e (extent-at (point) nil 'find-variable-symbol)) - (if e - (find-variable (extent-property e 'find-variable-symbol)) + (if (and-fboundp #'find-variable e) + (with-fboundp #'find-variable + (find-variable (extent-property e 'find-variable-symbol))) (mouse-track event))))) +(define-minor-mode temp-buffer-resize-mode + "Toggle the mode which makes windows smaller for temporary buffers. +With prefix argument ARG, turn the resizing of windows displaying temporary +buffers on if ARG is positive or off otherwise. +This makes the window the right height for its contents, but never +less than `window-min-height' nor a higher proportion of its frame than +`temp-buffer-max-height'. (Note the differing semantics of the latter +versus GNU Emacs, where `temp-buffer-max-height' is an integer number of +lines.) +This applies to `help', `apropos' and `completion' buffers, and some others." + :global t :group 'help + ;; XEmacs; our implementation of this is very different. + (setq temp-buffer-shrink-to-fit temp-buffer-resize-mode)) + +;; GNU name for this function. +(defalias 'resize-temp-buffer-window 'shrink-window-if-larger-than-buffer) + ;;; help.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/info.el --- a/lisp/info.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/info.el Sat Oct 25 21:40:46 2008 +0900 @@ -479,6 +479,9 @@ (".info.zip" . "unzip -c %s") (".y" . "cat %s | unyabba") ("info.y" . "cat %s | unyabba") + ;; Mandriva Linux uses lzma. + (".lzma" . "unlzma --stdout %s") + (".info.lzma" . "unlzma --stdout %s") ;; These ones are for MS-DOS filenames. (".inf" . nil) (".igz" . "gzip -dc %s") diff -r 71bf2c5667ba -r 66411359ce4e lisp/isearch-mode.el --- a/lisp/isearch-mode.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/isearch-mode.el Sat Oct 25 21:40:46 2008 +0900 @@ -712,7 +712,7 @@ search and `search-nonincremental-instead' is non-nil, do a nonincremental search instead via `isearch-edit-string'." (interactive) - (if (and search-nonincremental-instead + (if (and (or search-nonincremental-instead executing-kbd-macro) (= 0 (length isearch-string))) (let ((isearch-nonincremental t) ;; Highlighting only gets in the way of nonincremental diff -r 71bf2c5667ba -r 66411359ce4e lisp/iso8859-1.el --- a/lisp/iso8859-1.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/iso8859-1.el Sat Oct 25 21:40:46 2008 +0900 @@ -1,4 +1,4 @@ -;;; iso8859-1.el --- Set syntax table for Latin 1 +;;; iso8859-1.el --- Set case table for Latin 1 ;; Copyright (C) 1992, 1997, 2006 Free Software Foundation, Inc. @@ -28,71 +28,63 @@ ;;; Commentary: -;; created by jwz, 19-aug-92. ;; Sets the case table for the ISO-8859/1 character set. -;; Used to set the syntax table. +;; Provides ascii-case-table, for use in environments where multilingual +;; case-insensitive processing is inappropriate. ;;; Code: -(defconst iso8859/1-case-table nil - "The case table for ISO-8859/1 characters.") - -;;; This macro expands into -;;; (setq iso8859/1-case-table (purecopy '("..." nil nil nil))) -;;; doing the computation of the case table at compile-time. +(defvar ascii-case-table + (loop + for lower from (char-int ?a) to (char-int ?z) + and upper from (char-int ?A) to (char-int ?Z) + with table = (make-case-table) + do (put-case-table-pair (coerce upper 'character) + (coerce lower 'character) + table) + finally return table) + "Case table for the ASCII character set.") -((macro - . (lambda (&rest pairs) - (let ((downcase (make-string 256 0)) - (i 0)) - (while (< i 256) - (aset downcase i (if (and (>= i ?A) (<= i ?Z)) (+ i 32) i)) - (setq i (1+ i))) - (while pairs - (aset downcase (car (car pairs)) (car (cdr (car pairs)))) - (setq pairs (cdr pairs))) - (cons 'setq - (cons 'iso8859/1-case-table - (list - (list 'quote - (list downcase nil nil nil)))))))) - - (?\300 ?\340) ; Agrave - (?\301 ?\341) ; Aacute - (?\302 ?\342) ; Acircumflex - (?\303 ?\343) ; Atilde - (?\304 ?\344) ; Adiaeresis - (?\305 ?\345) ; Aring - (?\306 ?\346) ; AE - (?\307 ?\347) ; Ccedilla - (?\310 ?\350) ; Egrave - (?\311 ?\351) ; Eacute - (?\312 ?\352) ; Ecircumflex - (?\313 ?\353) ; Ediaeresis - (?\314 ?\354) ; Igrave - (?\315 ?\355) ; Iacute - (?\316 ?\356) ; Icircumflex - (?\317 ?\357) ; Idiaeresis - (?\320 ?\360) ; ETH - (?\321 ?\361) ; Ntilde - (?\322 ?\362) ; Ograve - (?\323 ?\363) ; Oacute - (?\324 ?\364) ; Ocircumflex - (?\325 ?\365) ; Otilde - (?\326 ?\366) ; Odiaeresis - (?\330 ?\370) ; Ooblique - (?\331 ?\371) ; Ugrave - (?\332 ?\372) ; Uacute - (?\333 ?\373) ; Ucircumflex - (?\334 ?\374) ; Udiaeresis - (?\335 ?\375) ; Yacute - (?\336 ?\376) ; THORN - ) +(loop + for (upper lower) + in '((?\xC0 ?\xE0) ;; A WITH GRAVE + (?\xC1 ?\xE1) ;; A WITH ACUTE + (?\xC2 ?\xE2) ;; A WITH CIRCUMFLEX + (?\xC3 ?\xE3) ;; A WITH TILDE + (?\xC4 ?\xE4) ;; A WITH DIAERESIS + (?\xC5 ?\xE5) ;; A WITH RING ABOVE + (?\xC6 ?\xE6) ;; AE + (?\xC7 ?\xE7) ;; C WITH CEDILLA + (?\xC8 ?\xE8) ;; E WITH GRAVE + (?\xC9 ?\xE9) ;; E WITH ACUTE + (?\xCA ?\xEA) ;; E WITH CIRCUMFLEX + (?\xCB ?\xEB) ;; E WITH DIAERESIS + (?\xCC ?\xEC) ;; I WITH GRAVE + (?\xCD ?\xED) ;; I WITH ACUTE + (?\xCE ?\xEE) ;; I WITH CIRCUMFLEX + (?\xCF ?\xEF) ;; I WITH DIAERESIS + (?\xD0 ?\xF0) ;; ETH + (?\xD1 ?\xF1) ;; N WITH TILDE + (?\xD2 ?\xF2) ;; O WITH GRAVE + (?\xD3 ?\xF3) ;; O WITH ACUTE + (?\xD4 ?\xF4) ;; O WITH CIRCUMFLEX + (?\xD5 ?\xF5) ;; O WITH TILDE + (?\xD6 ?\xF6) ;; O WITH DIAERESIS + (?\xD8 ?\xF8) ;; O WITH STROKE + (?\xD9 ?\xF9) ;; U WITH GRAVE + (?\xDA ?\xFA) ;; U WITH ACUTE + (?\xDB ?\xFB) ;; U WITH CIRCUMFLEX + (?\xDC ?\xFC) ;; U WITH DIAERESIS + (?\xDD ?\xFD) ;; Y WITH ACUTE + (?\xDE ?\xFE)) ;; THORN + with case-table = (standard-case-table) + do (put-case-table-pair upper lower case-table)) -(set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table)) +;; Everything Latin-1 and above should be displayed as its character value +;; by default. +(setq-default ctl-arrow #xA0) -(setq-default ctl-arrow 'iso-8859/1) - -(provide 'iso8859-1) +;; Shouldn't be necessary, but one file in the packages uses it: +(provide 'iso8859-1) ;;; iso8859-1.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/keydefs.el --- a/lisp/keydefs.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/keydefs.el Sat Oct 25 21:40:46 2008 +0900 @@ -620,12 +620,16 @@ (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 '(shift delete) 'kill-primary-selection) + (define-key global-map 'kp-delete 'backward-or-forward-delete-char) (define-key global-map '(control kp-delete) 'backward-or-forward-kill-word) (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) +(define-key global-map '(shift kp-delete) 'kill-primary-selection) + ;; 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) @@ -674,4 +678,12 @@ ;(define-key global-map 'insertchar 'function-key-error) (define-key global-map 'deletechar 'delete-char) +;; Bind the mouse wheel by default. +(dolist (keyspec '([(mouse-4)] [(shift mouse-4)] [(control mouse-4)] + [(mouse-5)] [(shift mouse-5)] [(control mouse-5)])) + (define-key global-map keyspec + #'(lambda (event) + (interactive "e") + (mwheel-install) + (declare-fboundp (mwheel-scroll event))))) ;;; keydefs.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/loadhist.el --- a/lisp/loadhist.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/loadhist.el Sat Oct 25 21:40:46 2008 +0900 @@ -25,6 +25,8 @@ ;;; Synched up with: FSF 20.2. +;; #### Sync this file! + ;;; Commentary: ;; This file is dumped with XEmacs. @@ -37,19 +39,36 @@ ;; load-history is a list of entries that look like this: ;; ("outline" outline-regexp ... (require . wid-edit) ... (provide . outline) ...) -(defun symbol-file (sym) +(defun symbol-file (sym &optional type) "Return the input source from which SYM was loaded. -This is a file name, or nil if the source was a buffer with no associated file." +This is a file name, or nil if the source was a buffer with no associated file. + +If TYPE is nil or omitted, any kind of definition is acceptable. +If TYPE is `defun', then function, subr, special form or macro definitions +are acceptable. +If TYPE is `defvar', then variable definitions are acceptable. + +#### For the moment the difference is not implemented for non-autoloaded +Lisp symbols." (interactive "SFind source file for symbol: ") ; XEmacs (block look-up-symbol-file - (dolist (entry load-history) - (when (memq sym (cdr entry)) - (return-from look-up-symbol-file (car entry)))) - (when (or (and (boundp sym) (built-in-variable-type sym)) - (and (fboundp sym) (subrp (symbol-function sym)))) - (let ((built-in-file (built-in-symbol-file sym))) - (if built-in-file - (concat source-directory "/src/" built-in-file)))))) + (let (built-in-file autoload-cons) + (when (and + (eq 'autoload + (car-safe (setq autoload-cons + (and (fboundp sym) + (symbol-function sym))))) + (or (and (or (null type) (eq 'defvar type)) + (eq (fifth autoload-cons) 'keymap)) + (and (or (null type) (eq 'defvar type)) + (memq (fifth autoload-cons) '(nil macro))))) + (return-from look-up-symbol-file + (locate-library (second autoload-cons)))) + (dolist (entry load-history) + (when (memq sym (cdr entry)) + (return-from look-up-symbol-file (car entry)))) + (setq built-in-file (built-in-symbol-file sym type)) + (if built-in-file (concat source-directory "/src/" built-in-file))))) (defun feature-symbols (feature) "Return the file and list of symbols associated with a given FEATURE." diff -r 71bf2c5667ba -r 66411359ce4e lisp/loadup.el --- a/lisp/loadup.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/loadup.el Sat Oct 25 21:40:46 2008 +0900 @@ -69,9 +69,6 @@ (defvar preloaded-file-list nil "List of files preloaded into the XEmacs binary image.") -(defvar Installation-string nil - "Description of XEmacs installation.") - ;(start-profiling) (let ((gc-cons-threshold @@ -88,22 +85,6 @@ ;; This is awfully damn early to be getting an error, right? (call-with-condition-handler 'really-early-error-handler #'(lambda () - - ;; Initialize Installation-string. We do it before loading - ;; anything so that dumped code can make use of its value. - (setq Installation-string - (save-current-buffer - (set-buffer (get-buffer-create (generate-new-buffer-name - " *temp*"))) - ;; insert-file-contents-internal bogusly calls - ;; format-decode without checking if it's defined. - (fset 'format-decode #'(lambda (f l &optional v) l)) - (insert-file-contents-internal - (expand-file-name "Installation" build-directory)) - (fmakunbound 'format-decode) - (prog1 (buffer-substring) - (kill-buffer (current-buffer))))) - (setq load-path (list source-lisp)) (setq module-load-path (list (expand-file-name "modules" build-directory))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/map-ynp.el --- a/lisp/map-ynp.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/map-ynp.el Sat Oct 25 21:40:46 2008 +0900 @@ -162,9 +162,11 @@ ;; Prompt the user about this object. (setq quit-flag nil) (if mouse-event ; XEmacs - (setq def (or (get-dialog-box-response - mouse-event - (cons prompt map)) + (setq def (or (and-fboundp + #'get-dialog-box-response + (get-dialog-box-response + mouse-event + (cons prompt map))) 'quit)) ;; Prompt in the echo area. (let ((cursor-in-echo-area (not no-cursor-in-echo-area))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/menubar-items.el --- a/lisp/menubar-items.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/menubar-items.el Sat Oct 25 21:40:46 2008 +0900 @@ -99,23 +99,20 @@ (coding-system-list))))) (defconst default-menubar -; (purecopy-menubar ;purespace is dead - ;; note backquote. - `( - ("%_File" + ;; This is backquoted; a lambda with a preceding , will be byte-compiled. + `(("%_File" ["%_Open..." find-file] ["Open in Other %_Window..." find-file-other-window] ["Open in New %_Frame..." find-file-other-frame] ("Open with Specified %_Encoding" :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (let ((coding-system-for-read entry)) - (call-interactively 'find-file))) - (lambda (entry) t) - t)) - ) + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (let ((coding-system-for-read entry)) + (call-interactively 'find-file))) + (lambda (entry) t) + t))) ["%_Hex Edit File..." hexl-find-file :active (fboundp 'hexl-find-file)] ["%_Insert File..." insert-file] @@ -135,7 +132,7 @@ ["Save So%_me Buffers" save-some-buffers] "-----" ,@(if (valid-specifier-tag-p 'msprinter) - '(["Page Set%_up..." generic-page-setup])) + '(["Page Set%_up..." generic-page-setup])) ["%_Print" generic-print-buffer :active (or (valid-specifier-tag-p 'msprinter) (and (not (eq system-type 'windows-nt)) @@ -152,384 +149,386 @@ :active (or buffer-file-name revert-buffer-function) :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] ("Rever%_t/Recover" - ("Revert Buffer with Specified %_Encoding" - :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (let ((coding-system-for-read entry)) - (revert-buffer))) - (lambda (entry) (or buffer-file-name revert-buffer-function)) - t)) + ("Revert Buffer with Specified %_Encoding" + :filter + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (let ((coding-system-for-read entry)) + (revert-buffer))) + (lambda (entry) (or buffer-file-name revert-buffer-function)) + t))) + ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name) + :active buffer-file-name + :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] + ["Recover %_Session..." recover-session] ) - ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name) - :active buffer-file-name - :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] - ["Recover %_Session..." recover-session] - ) "-----" ["E%_xit XEmacs" save-buffers-kill-emacs] ) ("%_Edit" - ["%_Undo" undo - :active (and (not (eq buffer-undo-list t)) - (or buffer-undo-list pending-undo-list)) - :suffix (if (eq last-command 'undo) "More" "")] - ["%_Redo" redo - :included (fboundp 'redo) - :active (not (or (eq buffer-undo-list t) - (eq last-buffer-undo-list nil) - (not (or (eq last-buffer-undo-list buffer-undo-list) - (and (null (car-safe buffer-undo-list)) - (eq last-buffer-undo-list - (cdr-safe buffer-undo-list))))) - (or (eq buffer-undo-list pending-undo-list) - (eq (cdr buffer-undo-list) pending-undo-list)))) - :suffix (if (eq last-command 'redo) "More" "")] - "----" - ["Cu%_t" kill-primary-selection - :active (selection-owner-p)] - ["%_Copy" copy-primary-selection - :active (selection-owner-p)] - ["%_Paste" yank-clipboard-selection - :active (selection-exists-p 'CLIPBOARD)] - ["%_Delete" delete-primary-selection - :active (selection-owner-p)] - "----" - ["Select %_All" mark-whole-buffer] - ["Select Pa%_ge" mark-page] - ["Select Paragrap%_h" mark-paragraph] - ["Re%_select Region" activate-region :active (mark t)] - "----" - ["%_Find..." make-search-dialog] - ["R%_eplace..." query-replace] - ["Replace (Rege%_xp)..." query-replace-regexp] - ["List %_Matching Lines..." list-matching-lines] - ) + ["%_Undo" undo + :active (and (not (eq buffer-undo-list t)) + (or buffer-undo-list pending-undo-list)) + :suffix (if (eq last-command 'undo) "More" "")] + ["%_Redo" redo + :included (fboundp 'redo) + :active (not (or (eq buffer-undo-list t) + (eq last-buffer-undo-list nil) + (not (or (eq last-buffer-undo-list buffer-undo-list) + (and (null (car-safe buffer-undo-list)) + (eq last-buffer-undo-list + (cdr-safe buffer-undo-list))))) + (or (eq buffer-undo-list pending-undo-list) + (eq (cdr buffer-undo-list) pending-undo-list)))) + :suffix (if (eq last-command 'redo) "More" "")] + "----" + ["Cu%_t" kill-primary-selection + :active (selection-owner-p)] + ["%_Copy" copy-primary-selection + :active (selection-owner-p)] + ["%_Paste" yank-clipboard-selection + :active (selection-exists-p 'CLIPBOARD)] + ["%_Delete" delete-primary-selection + :active (selection-owner-p)] + "----" + ["Select %_All" mark-whole-buffer] + ["Select Pa%_ge" mark-page] + ["Select Paragrap%_h" mark-paragraph] + ["Re%_select Region" activate-region :active (mark t)] + "----" + ["%_Find..." make-search-dialog] + ["R%_eplace..." query-replace] + ["Replace (Rege%_xp)..." query-replace-regexp] + ["List %_Matching Lines..." list-matching-lines] + ) ("%_View" - ["%_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))] - ["Balance %_Windows" balance-windows - :active (not (one-window-p t))] - ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer] - "----" - ("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))))] - ) + ["%_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))] + ["Balance %_Windows" balance-windows + :active (not (one-window-p t))] + ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer] + "----" + ("N%_arrow" + ["%_Narrow to Region" narrow-to-region :active (region-exists-p)] + ["Narrow to %_Page" narrow-to-page] + ["Narrow to %_Defun" narrow-to-defun] "----" - ["%_Goto Line..." goto-line] - ["Beginning of %_Defun" beginning-of-defun] - ["%_End of Defun" end-of-defun] - ["%_Count Lines in Buffer" count-lines-buffer - :included (not (region-active-p))] - ["%_Count Lines in Region" count-lines-region - :included (region-active-p)] - "----" - ["%_Jump to Previous Mark" (set-mark-command t) - :active (mark t)] - ["Se%_t Bookmark" bookmark-set - :active (fboundp 'bookmark-set)] - ("%_Bookmarks" - :filter - (lambda (menu) - (let ((alist (and-boundp 'bookmark-alist - bookmark-alist))) - (if (not alist) - menu - (let ((items + ["%_Widen" widen :active (or (/= (point-min) 1) + (/= (point-max) (1+ (buffer-size))))] + ) + "----" + ["%_Goto Line..." goto-line] + ["Beginning of %_Defun" beginning-of-defun] + ["%_End of Defun" end-of-defun] + ["%_Count Lines in Buffer" count-lines-buffer + :included (not (region-active-p))] + ["%_Count Lines in Region" count-lines-region + :included (region-active-p)] + "----" + ["%_Jump to Previous Mark" (set-mark-command t) + :active (mark t)] + ["Se%_t Bookmark" bookmark-set + :active (fboundp 'bookmark-set)] + ("%_Bookmarks" + :filter + ,#'(lambda (menu) + (let ((alist (and-boundp 'bookmark-alist + bookmark-alist))) + (if (not alist) + menu + (let ((items + (submenu-generate-accelerator-spec + (mapcar #'(lambda (bmk) + `[,bmk (bookmark-jump ',bmk)]) + (bookmark-all-names))))) + (append menu '("---") items))))) + "---" + ["Insert %_Contents" bookmark-menu-insert + :active (fboundp 'bookmark-menu-insert)] + ["Insert L%_ocation" bookmark-menu-locate + :active (fboundp 'bookmark-menu-locate)] + "---" + ["%_Rename Bookmark" bookmark-menu-rename + :active (fboundp 'bookmark-menu-rename)] + ("%_Delete Bookmark" + :filter ,#'(lambda (menu) (submenu-generate-accelerator-spec (mapcar #'(lambda (bmk) - `[,bmk (bookmark-jump ',bmk)]) + `[,bmk (bookmark-delete ',bmk)]) (bookmark-all-names))))) - (append menu '("---") items))))) - "---" - ["Insert %_Contents" bookmark-menu-insert - :active (fboundp 'bookmark-menu-insert)] - ["Insert L%_ocation" bookmark-menu-locate - :active (fboundp 'bookmark-menu-locate)] - "---" - ["%_Rename Bookmark" bookmark-menu-rename - :active (fboundp 'bookmark-menu-rename)] - ("%_Delete Bookmark" - :filter (lambda (menu) - (submenu-generate-accelerator-spec - (mapcar #'(lambda (bmk) - `[,bmk (bookmark-delete ',bmk)]) - (bookmark-all-names))))) - ["%_Edit Bookmark List" bookmark-bmenu-list - :active (and-boundp 'bookmark-alist bookmark-alist)] - "---" - ["%_Save Bookmarks" bookmark-save - :active (and-boundp 'bookmark-alist bookmark-alist)] - ["Save Bookmarks %_As..." bookmark-write - :active (and-boundp 'bookmark-alist bookmark-alist)] - ["%_Load a Bookmark File" bookmark-load - :active (fboundp 'bookmark-load)] - ) + ["%_Edit Bookmark List" bookmark-bmenu-list + :active (and-boundp 'bookmark-alist bookmark-alist)] + "---" + ["%_Save Bookmarks" bookmark-save + :active (and-boundp 'bookmark-alist bookmark-alist)] + ["Save Bookmarks %_As..." bookmark-write + :active (and-boundp 'bookmark-alist bookmark-alist)] + ["%_Load a Bookmark File" bookmark-load + :active (fboundp 'bookmark-load)] ) + ) ("C%_mds" - ["Repeat Last Comple%_x Command..." repeat-complex-command] - ["E%_valuate Lisp Expression..." eval-expression] - ["Execute %_Named Command..." execute-extended-command] - "----" - ["Start %_Defining Macro" start-kbd-macro - :included (not defining-kbd-macro)] - ["Stop %_Defining Macro" end-kbd-macro - :included defining-kbd-macro] - ["%_Execute Last Macro" call-last-kbd-macro + ["Repeat Last Comple%_x Command..." repeat-complex-command] + ["E%_valuate Lisp Expression..." eval-expression] + ["Execute %_Named Command..." execute-extended-command] + "----" + ["Start %_Defining Macro" start-kbd-macro + :included (not defining-kbd-macro)] + ["Stop %_Defining Macro" end-kbd-macro + :included defining-kbd-macro] + ["%_Execute Last Macro" call-last-kbd-macro + :active last-kbd-macro] + ("Other %_Macro" + ["Edit %_Last Macro" edit-last-kbd-macro + :active last-kbd-macro] + ["%_Edit Macro..." edit-kbd-macro] + ["%_Append to Last Macro" (start-kbd-macro t) + :active (and (not defining-kbd-macro) last-kbd-macro)] + "---" + ["%_Name Last Macro..." name-last-kbd-macro :active last-kbd-macro] - ("Other %_Macro" - ["Edit %_Last Macro" edit-last-kbd-macro - :active last-kbd-macro] - ["%_Edit Macro..." edit-kbd-macro] - ["%_Append to Last Macro" (start-kbd-macro t) - :active (and (not defining-kbd-macro) last-kbd-macro)] - "---" - ["%_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))] - "---" - ["E%_xecute Last Macro on Region Lines" - :active (and last-kbd-macro (region-exists-p))] - "---" - ["%_Query User During Macro" kbd-macro-query - :active defining-kbd-macro] - ["Enter %_Recursive Edit During Macro" (kbd-macro-query t) - :active defining-kbd-macro] - "---" - ["%_Insert Named Macro into Buffer..." insert-kbd-macro] - ["Read Macro from Re%_gion" read-kbd-macro - :active (region-exists-p)] - ) + ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key + :active (and last-kbd-macro + (fboundp 'assign-last-kbd-macro-to-key))] + "---" + ["E%_xecute Last Macro on Region Lines" + :active (and last-kbd-macro (region-exists-p))] + "---" + ["%_Query User During Macro" kbd-macro-query + :active defining-kbd-macro] + ["Enter %_Recursive Edit During Macro" (kbd-macro-query t) + :active defining-kbd-macro] + "---" + ["%_Insert Named Macro into Buffer..." insert-kbd-macro] + ["Read Macro from Re%_gion" read-kbd-macro + :active (region-exists-p)] + ) + "----" + ["D%_ynamic Abbrev Expand" dabbrev-expand] + ["Define %_Global Abbrev for " add-global-abbrev + :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) + 40 nil nil t)] + ("Other %_Abbrev" + ["Dynamic Abbrev %_Complete" dabbrev-completion] + ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)] "----" - ["D%_ynamic Abbrev Expand" dabbrev-expand] - ["Define %_Global Abbrev for " add-global-abbrev - :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) + "----" + ["%_Define Global Abbrev for " add-global-abbrev + :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) 40 nil nil t)] - ("Other %_Abbrev" - ["Dynamic Abbrev %_Complete" dabbrev-completion] - ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)] - "----" - "----" - ["%_Define Global Abbrev for " add-global-abbrev - :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) + ["Define %_Mode-Specific Abbrev for " add-mode-abbrev + :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) 40 nil nil t)] - ["Define %_Mode-Specific Abbrev for " add-mode-abbrev - :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) - 40 nil nil t)] - ["Define Global Ex%_pansion for " inverse-add-global-abbrev - :suffix (truncate-string-to-width + ["Define Global Ex%_pansion for " inverse-add-global-abbrev + :suffix (truncate-string-to-width (inverse-abbrev-string-to-be-defined 1) 40 nil nil t)] - ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev - :suffix (truncate-string-to-width + ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev + :suffix (truncate-string-to-width (inverse-abbrev-string-to-be-defined 1) 40 nil nil t)] - "---" - ["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] - ) - "---" - ["%_Cut Rectangle" kill-rectangle] - ["%_Prefix Rectangle..." string-rectangle] - ("Other %_Rectangles/Register" - ["%_Yank Rectangle" yank-rectangle] - ["Rectangle %_to Register" copy-rectangle-to-register] - ["Rectangle %_from Register" insert-register] - ["%_Delete Rectangle" clear-rectangle] - ["%_Open Rectangle" open-rectangle] - ["Rectangle %_Mousing" - (customize-set-variable 'mouse-track-rectangle-p + "---" + ["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] + ) + "---" + ["%_Cut Rectangle" kill-rectangle] + ["%_Prefix Rectangle..." string-rectangle] + ("Other %_Rectangles/Register" + ["%_Yank Rectangle" yank-rectangle] + ["Rectangle %_to Register" copy-rectangle-to-register] + ["Rectangle %_from Register" insert-register] + ["%_Delete Rectangle" clear-rectangle] + ["%_Open Rectangle" open-rectangle] + ["Rectangle %_Mousing" + (customize-set-variable 'mouse-track-rectangle-p (not mouse-track-rectangle-p)) - :style toggle :selected mouse-track-rectangle-p] - "---" - ["%_Copy to Register..." copy-to-register :active (region-exists-p)] - ["%_Append to Register..." append-register :active (region-exists-p)] - ["%_Insert Register..." insert-register] - "---" - ["%_Save Point to Register" point-to-register] - ["%_Jump to Register" register-to-point] - ) - "---" - ["%_Sort Lines in Region" sort-lines :active (region-exists-p)] - ["%_Uppercase Region or Word" upcase-region-or-word] - ["%_Lowercase Region or Word" downcase-region-or-word] - ["%_Indent Region or Balanced Expression" - indent-region-or-balanced-expression] - ["%_Fill Paragraph or Region" fill-paragraph-or-region] - ("Other %_Text Commands" - ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)] - ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)] - ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)] - ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)] - "---" - ["%_Capitalize Region" capitalize-region :active (region-exists-p)] - ["Title-C%_ase Region" capitalize-region-as-title - :active (region-exists-p)] - "----" - ["C%_enter Region or Paragraph" - (if (region-active-p) (center-region) (center-line))] - ["Center %_Line" center-line] - "---" - ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)] - ["In%_dent To Column..." indent-to-column] - "---" - ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p) - (fboundp 'untabify))] - ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p) - (fboundp 'tabify))] - ["Tab to Tab %_Stop" tab-to-tab-stop] - ["Edit Ta%_b Stops" edit-tab-stops] - ) - "---" - ("%_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] - ) - ) + :style toggle :selected mouse-track-rectangle-p] + "---" + ["%_Copy to Register..." copy-to-register :active (region-exists-p)] + ["%_Append to Register..." append-register :active (region-exists-p)] + ["%_Insert Register..." insert-register] + "---" + ["%_Save Point to Register" point-to-register] + ["%_Jump to Register" register-to-point] + ) + "---" + ["%_Sort Lines in Region" sort-lines :active (region-exists-p)] + ["%_Uppercase Region or Word" upcase-region-or-word] + ["%_Lowercase Region or Word" downcase-region-or-word] + ["%_Indent Region or Balanced Expression" + indent-region-or-balanced-expression] + ["%_Fill Paragraph or Region" fill-paragraph-or-region] + ("Other %_Text Commands" + ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)] + ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)] + ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)] + ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)] + "---" + ["%_Capitalize Region" capitalize-region :active (region-exists-p)] + ["Title-C%_ase Region" capitalize-region-as-title + :active (region-exists-p)] + "----" + ["C%_enter Region or Paragraph" + (if (region-active-p) (center-region) (center-line))] + ["Center %_Line" center-line] + "---" + ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)] + ["In%_dent To Column..." indent-to-column] + "---" + ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p) + (fboundp 'untabify))] + ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p) + (fboundp 'tabify))] + ["Tab to Tab %_Stop" tab-to-tab-stop] + ["Edit Ta%_b Stops" edit-tab-stops] + ) + "---" + ("%_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] + ) + ) ;; #### Delete this entire menu as soon as the new package source is ;; committed. ("%_Tools" - ("%_Packages" - ("%_Set Download Site" - ("%_Official Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-download-menu))))) - ("%_Pre-Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-pre-release-download-menu))))) - ("%_Site Releases" - :filter (lambda (&rest junk) - (menu-split-long-menu - (submenu-generate-accelerator-spec - (package-ui-site-release-download-menu)))))) - "--:shadowEtchedIn" - ["%_Update Package Index" package-get-update-base] - ["%_List and Install" pui-list-packages] - ["U%_pdate Installed Packages" package-get-update-all] - ["%_Help" (Info-goto-node "(xemacs)Packages")]) - ("%_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)]) + ("%_Packages" + ("%_Set Download Site" + ("%_Official Releases" + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-download-menu))))) + ("%_Pre-Releases" + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-pre-release-download-menu))))) + ("%_Site Releases" + :filter ,#'(lambda (&rest junk) + (menu-split-long-menu + (submenu-generate-accelerator-spec + (package-ui-site-release-download-menu)))))) + "--:shadowEtchedIn" + ["%_Update Package Index" package-get-update-base] + ["%_List and Install" pui-list-packages] + ["U%_pdate Installed Packages" package-get-update-all] + ["%_Help" (Info-goto-node "(xemacs)Packages")]) + ("%_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-boundp 'grep-history + (if grep-history + (let ((items + (submenu-generate-accelerator-spec + (mapcar #'(lambda (label-value) + (vector (first label-value) + (list 'grep + (second label-value)))) + (Menubar-items-truncate-history + grep-history 10 50))))) + (append menu '("---") items)) + menu) + menu)) + ["%_Grep..." grep :active (fboundp 'grep)] + ["%_Kill Grep" kill-compilation + :active (and (fboundp 'kill-compilation) + (fboundp 'compilation-find-buffer) + (let ((buffer (condition-case nil + (compilation-find-buffer) + (error nil)))) + (and buffer (get-buffer-process buffer))))] "---" - ("%_Grep" - :filter - (lambda (menu) - (if (or (not (boundp 'grep-history)) (null grep-history)) - menu - (let ((items - (submenu-generate-accelerator-spec - (mapcar #'(lambda (label-value) - (vector (first label-value) - (list 'grep (second label-value)))) - (Menubar-items-truncate-history - grep-history 10 50))))) - (append menu '("---") items)))) - ["%_Grep..." grep :active (fboundp 'grep)] - ["%_Kill Grep" kill-compilation - :active (and (fboundp 'kill-compilation) - (fboundp 'compilation-find-buffer) - (let ((buffer (condition-case nil - (compilation-find-buffer) - (error nil)))) - (and buffer (get-buffer-process buffer))))] - "---" - ["Grep %_All Files in Current Directory..." - grep-all-files-in-current-directory - :active (fboundp 'grep-all-files-in-current-directory)] - ["Grep All Files in Current Directory %_Recursively..." - grep-all-files-in-current-directory-and-below - :active (fboundp 'grep-all-files-in-current-directory-and-below)] - "---" - ["Grep %_C and C Header Files in Current Directory..." - (progn - (require 'compile) - (let ((grep-command - (cons (concat grep-command " *.[chCH]" + ["Grep %_All Files in Current Directory..." + grep-all-files-in-current-directory + :active (fboundp 'grep-all-files-in-current-directory)] + ["Grep All Files in Current Directory %_Recursively..." + grep-all-files-in-current-directory-and-below + :active (fboundp 'grep-all-files-in-current-directory-and-below)] + "---" + ["Grep %_C and C Header Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.[chCH]" ; i wanted to also use *.cc and *.hh. ; see long comment below under Perl. - ) - (length grep-command)))) - (call-interactively 'grep))) - :active (fboundp 'grep)] - ["Grep C Hea%_der Files in Current Directory..." - (progn - (require 'compile) - (let ((grep-command - (cons (concat grep-command " *.[hH]" + ) + (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep C Hea%_der Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.[hH]" ; i wanted to also use *.hh. ; see long comment below under Perl. - ) - (length grep-command)))) - (call-interactively 'grep))) - :active (fboundp 'grep)] - ["Grep %_E-Lisp Files in Current Directory..." - (progn - (require 'compile) - (let ((grep-command - (cons (concat grep-command " *.el") - (length grep-command)))) - (call-interactively 'grep))) - :active (fboundp 'grep)] - ["Grep %_Perl Files in Current Directory..." - (progn - (require 'compile) - (let ((grep-command - (cons (concat grep-command " *.pl" + ) + (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep %_E-Lisp Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.el") + (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep %_Perl Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.pl" ; i wanted to use this: ; " *.pl *.pm *.am" ; but grep complains if it can't @@ -539,601 +538,596 @@ ; each separate glob in the directory ; to see if there are any files in ; that glob, and if not, omit it. - ) - (length grep-command)))) - (call-interactively 'grep))) - :active (fboundp 'grep)] - ["Grep %_HTML Files in Current Directory..." - (progn - (require 'compile) - (let ((grep-command - (cons (concat grep-command " *.*htm*") - (length grep-command)))) - (call-interactively 'grep))) - :active (fboundp 'grep)] - "---" - ["%_Next Match" next-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["Pre%_vious Match" previous-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["%_First Match" first-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["G%_oto Match" compile-goto-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - "---" - ["%_Set Grep Command..." - (progn - (require 'compile) - (customize-set-variable - 'grep-command - (read-shell-command "Default Grep Command: " grep-command))) - :active (fboundp 'grep) - ] - ) - ("%_Compile" - :filter - (lambda (menu) - (if (or (not (boundp 'compile-history)) (null compile-history)) - menu - (let ((items - (submenu-generate-accelerator-spec - (mapcar #'(lambda (label-value) - (vector (first label-value) - (list 'compile (second label-value)))) - (Menubar-items-truncate-history - compile-history 10 50))))) - (append menu '("---") items)))) - ["%_Compile..." compile :active (fboundp 'compile)] - ["%_Repeat Compilation" recompile :active (fboundp 'recompile)] - ["%_Kill Compilation" kill-compilation - :active (and (fboundp 'kill-compilation) - (fboundp 'compilation-find-buffer) - (let ((buffer (condition-case nil - (compilation-find-buffer) - (error nil)))) - (and buffer (get-buffer-process buffer))))] - "---" - ["%_Next Error" next-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["Pre%_vious Error" previous-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["%_First Error" first-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ["G%_oto Error" compile-goto-error - :active (and (fboundp 'compilation-errors-exist-p) - (compilation-errors-exist-p))] - ) - ("%_Debug" - ["%_GDB..." gdb - :active (fboundp 'gdb)] - ["%_DBX..." dbx - :active (fboundp 'dbx)]) - ("%_Shell" - ["%_Shell" shell - :active (fboundp 'shell)] - ["S%_hell Command..." shell-command - :active (fboundp 'shell-command)] - ["Shell Command on %_Region..." shell-command-on-region + ) + (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + ["Grep %_HTML Files in Current Directory..." + (progn + (require 'compile) + (let ((grep-command + (cons (concat grep-command " *.*htm*") + (length grep-command)))) + (call-interactively 'grep))) + :active (fboundp 'grep)] + "---" + ["%_Next Match" next-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["Pre%_vious Match" previous-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_First Match" first-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["G%_oto Match" compile-goto-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + "---" + ["%_Set Grep Command..." + (progn + (require 'compile) + (customize-set-variable + 'grep-command + (read-shell-command "Default Grep Command: " grep-command))) + :active (fboundp 'grep) + ] + ) + ("%_Compile" + :filter + ,#'(lambda (menu) + (if-boundp 'compile-history + (if compile-history + (let ((items + (submenu-generate-accelerator-spec + (mapcar #'(lambda (label-value) + (vector (first label-value) + (list 'compile + (second label-value)))) + (Menubar-items-truncate-history + compile-history 10 50))))) + (append menu '("---") items)) + menu) + menu)) + ["%_Compile..." compile :active (fboundp 'compile)] + ["%_Repeat Compilation" recompile :active (fboundp 'recompile)] + ["%_Kill Compilation" kill-compilation + :active (and (fboundp 'kill-compilation) + (fboundp 'compilation-find-buffer) + (let ((buffer (condition-case nil + (compilation-find-buffer) + (error nil)))) + (and buffer (get-buffer-process buffer))))] + "---" + ["%_Next Error" next-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["Pre%_vious Error" previous-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["%_First Error" first-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ["G%_oto Error" compile-goto-error + :active (and (fboundp 'compilation-errors-exist-p) + (compilation-errors-exist-p))] + ) + ("%_Debug" + ["%_GDB..." gdb + :active (fboundp 'gdb)] + ["%_DBX..." dbx + :active (fboundp 'dbx)]) + ("%_Shell" + ["%_Shell" shell + :active (fboundp 'shell)] + ["S%_hell Command..." shell-command + :active (fboundp 'shell-command)] + ["Shell Command on %_Region..." shell-command-on-region :active (and (fboundp 'shell-command-on-region) (region-exists-p))]) - ("%_Tags" - ["%_Find Tag..." find-tag] - ["Find %_Other Window..." find-tag-other-window] - ["%_Next Tag..." (find-tag nil)] - ["N%_ext Other Window..." (find-tag-other-window nil)] - ["Next %_File" next-file] - "-----" - ["Tags %_Search..." tags-search] - ["Tags %_Replace..." tags-query-replace] - ["%_Continue Search/Replace" tags-loop-continue] - "-----" - ["%_Pop stack" pop-tag-mark] - ["%_Apropos..." tags-apropos] - "-----" - ["%_Set Tags Table File..." visit-tags-table] - ) + ("%_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 - :active (fboundp 'diary)] - ["%_Holidays" holidays - :active (fboundp 'holidays)] - ;; we're all pagans at heart ... - ["%_Phases of the Moon" phases-of-moon - :active (fboundp 'phases-of-moon)] - ["%_Sunrise/Sunset" sunrise-sunset - :active (fboundp 'sunrise-sunset)]) + ("Ca%_lendar" + ["%_3-Month Calendar" calendar + :active (fboundp 'calendar)] + ["%_Diary" diary + :active (fboundp 'diary)] + ["%_Holidays" holidays + :active (fboundp 'holidays)] + ;; we're all pagans at heart ... + ["%_Phases of the Moon" phases-of-moon + :active (fboundp 'phases-of-moon)] + ["%_Sunrise/Sunset" sunrise-sunset + :active (fboundp 'sunrise-sunset)]) - ("Ga%_mes" - ["%_Mine Game" xmine - :active (fboundp 'xmine)] - ["%_Tetris" tetris - :active (fboundp 'tetris)] - ["%_Sokoban" sokoban - :active (fboundp 'sokoban)] - ["Quote from %_Zippy" yow - :active (fboundp 'yow)] - ["%_Psychoanalyst" doctor - :active (fboundp 'doctor)] - ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead - :active (fboundp 'psychoanalyze-pinhead)] - ["%_Random Flames" flame - :active (fboundp 'flame)] - ["%_Dunnet (Adventure)" dunnet - :active (fboundp 'dunnet)] - ["Towers of %_Hanoi" hanoi - :active (fboundp 'hanoi)] - ["Game of %_Life" life - :active (fboundp 'life)] - ["M%_ultiplication Puzzle" mpuz - :active (fboundp 'mpuz)]) + ("Ga%_mes" + ["%_Mine Game" xmine + :active (fboundp 'xmine)] + ["%_Tetris" tetris + :active (fboundp 'tetris)] + ["%_Sokoban" sokoban + :active (fboundp 'sokoban)] + ["Quote from %_Zippy" yow + :active (fboundp 'yow)] + ["%_Psychoanalyst" doctor + :active (fboundp 'doctor)] + ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead + :active (fboundp 'psychoanalyze-pinhead)] + ["%_Random Flames" flame + :active (fboundp 'flame)] + ["%_Dunnet (Adventure)" dunnet + :active (fboundp 'dunnet)] + ["Towers of %_Hanoi" hanoi + :active (fboundp 'hanoi)] + ["Game of %_Life" life + :active (fboundp 'life)] + ["M%_ultiplication Puzzle" mpuz + :active (fboundp 'mpuz)]) - "----" - ) + "----" + ) ; ("%_Tools" ; :filter behavior-menu-filter) ("%_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]) + ("%_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]) + "---" + ("%_Editing" + ["This Buffer %_Read Only" (toggle-read-only) + :style toggle :selected buffer-read-only] + ["%_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] + ["%_Abbrev Mode" + (customize-set-variable 'abbrev-mode + (not (default-value 'abbrev-mode))) + :style toggle + :selected (default-value 'abbrev-mode)] + ["Active Re%_gions" + (customize-set-variable 'zmacs-regions (not zmacs-regions)) + :style toggle :selected zmacs-regions] + "---" + ["%_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" + (customize-set-variable 'case-replace (not case-replace)) + :style toggle :selected case-replace] + "---" + ("%_Newline at End of File..." + ["%_Don't Require" + (customize-set-variable 'require-final-newline nil) + :style radio :selected (not require-final-newline)] + ["%_Require" + (customize-set-variable 'require-final-newline t) + :style radio :selected (eq require-final-newline t)] + ["%_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" + (customize-set-variable 'next-line-add-newlines + (not next-line-add-newlines)) + :style toggle :selected next-line-add-newlines]) + ("%_Keyboard and Mouse" + ["%_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)] + ["`kill-%_word' Stores in Clipboard" + (customize-set-variable 'kill-word-into-kill-ring + (not kill-word-into-kill-ring)) + :style toggle + :selected kill-word-into-kill-ring] + ["`kill-%_line' Kills Whole Line at Beg" + (customize-set-variable 'kill-whole-line (not kill-whole-line)) + :style toggle + :selected kill-whole-line] + ["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)] + "----" + ["S%_hifted Motion Keys Select Region" + (customize-set-variable 'shifted-motion-keys-select-region + (not shifted-motion-keys-select-region)) + :style toggle + :selected shifted-motion-keys-select-region] + ["%_After Shifted Motion, Unshifted Motion Keys Deselect" + (customize-set-variable 'unshifted-motion-keys-deselect-region + (not unshifted-motion-keys-deselect-region)) + :style toggle + :selected unshifted-motion-keys-deselect-region] + "----" + ["%_Set Key..." global-set-key] + ["%_Unset Key..." global-unset-key] + "---" + ["%_Mouse Paste at Text Cursor (not Clicked Location)" + (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) + :style toggle :selected mouse-yank-at-point] "---" - ("%_Editing" - ["This Buffer %_Read Only" (toggle-read-only) - :style toggle :selected buffer-read-only] - ["%_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] - ["%_Abbrev Mode" - (customize-set-variable 'abbrev-mode - (not (default-value 'abbrev-mode))) - :style toggle - :selected (default-value 'abbrev-mode)] - ["Active Re%_gions" - (customize-set-variable 'zmacs-regions (not zmacs-regions)) - :style toggle :selected zmacs-regions] - "---" - ["%_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" - (customize-set-variable 'case-replace (not case-replace)) - :style toggle :selected case-replace] - "---" - ("%_Newline at End of File..." - ["%_Don't Require" - (customize-set-variable 'require-final-newline nil) - :style radio :selected (not require-final-newline)] - ["%_Require" - (customize-set-variable 'require-final-newline t) - :style radio :selected (eq require-final-newline t)] - ["%_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" - (customize-set-variable 'next-line-add-newlines - (not next-line-add-newlines)) - :style toggle :selected next-line-add-newlines]) - ("%_Keyboard and Mouse" - ["%_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)] - ["`kill-%_word' Stores in Clipboard" - (customize-set-variable 'kill-word-into-kill-ring - (not kill-word-into-kill-ring)) - :style toggle - :selected kill-word-into-kill-ring] - ["`kill-%_line' Kills Whole Line at Beg" - (customize-set-variable 'kill-whole-line (not kill-whole-line)) - :style toggle - :selected kill-whole-line] - ["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)] - "----" - ["S%_hifted Motion Keys Select Region" - (customize-set-variable 'shifted-motion-keys-select-region - (not shifted-motion-keys-select-region)) - :style toggle - :selected shifted-motion-keys-select-region] - ["%_After Shifted Motion, Unshifted Motion Keys Deselect" - (customize-set-variable 'unshifted-motion-keys-deselect-region - (not unshifted-motion-keys-deselect-region)) - :style toggle - :selected unshifted-motion-keys-deselect-region] - "----" - ["%_Set Key..." global-set-key] - ["%_Unset Key..." global-unset-key] - "---" - ["%_Mouse Paste at Text Cursor (not Clicked Location)" - (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) - :style toggle :selected mouse-yank-at-point] - "---" - ["%_Teach Extended Commands" - (customize-set-variable 'teach-extended-commands-p - (not teach-extended-commands-p)) - :style toggle :selected teach-extended-commands-p] + ["%_Teach Extended Commands" + (customize-set-variable 'teach-extended-commands-p + (not teach-extended-commands-p)) + :style toggle :selected teach-extended-commands-p] + ) + ("%_Printing" + ["Set Printer %_Name for Generic Print Support..." + (customize-set-variable + 'printer-name + (read-string "Set printer name: " printer-name))] + "---" + ["Command-Line %_Switches for `lpr'/`lp'..." + ;; better to directly open a customization buffer, since the value + ;; must be a list of strings, which is somewhat complex to prompt for. + (customize-variable 'lpr-switches) + (boundp 'lpr-switches)] + ("%_Pretty-Print Paper Size" + ["%_Letter" + (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)] + ["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)] + ["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" + (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" + (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" + (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)] + ["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)] + ["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" + (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)] + ["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)] + ["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" + (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" + (cond (ps-print-color-p + (customize-set-variable 'ps-print-color-p nil) + ;; I'm wondering whether all this muck is useful. + (and (boundp 'original-face-background) + original-face-background + (set-face-background 'default original-face-background))) + (t + (customize-set-variable 'ps-print-color-p t) + (setq original-face-background + (face-background-instance 'default)) + (set-face-background 'default "white"))) + :style toggle + :selected (and (boundp 'ps-print-color-p) ps-print-color-p) + :active (boundp 'ps-print-color-p)]) + ("%_Internet" + ("%_Compose Mail With" + ["VM mail package" + (customize-set-variable 'mail-user-agent 'vm-user-agent) + :style radio + :selected (eq mail-user-agent 'vm-user-agent) + :active (get 'vm-user-agent 'composefunc)] + ["Bare-bones 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)] ) - ("%_Printing" - ["Set Printer %_Name for Generic Print Support..." - (customize-set-variable - 'printer-name - (read-string "Set printer name: " printer-name))] - "---" - ["Command-Line %_Switches for `lpr'/`lp'..." - ;; better to directly open a customization buffer, since the value - ;; must be a list of strings, which is somewhat complex to prompt for. - (customize-variable 'lpr-switches) - (boundp 'lpr-switches)] - ("%_Pretty-Print Paper Size" - ["%_Letter" - (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)] - ["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)] - ["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" - (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" - (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" - (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)] - ["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)] - ["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" - (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)] - ["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)] - ["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" - (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" - (cond (ps-print-color-p - (customize-set-variable 'ps-print-color-p nil) - ;; I'm wondering whether all this muck is useful. - (and (boundp 'original-face-background) - original-face-background - (set-face-background 'default original-face-background))) - (t - (customize-set-variable 'ps-print-color-p t) - (setq original-face-background - (face-background-instance 'default)) - (set-face-background 'default "white"))) - :style toggle - :selected (and (boundp 'ps-print-color-p) ps-print-color-p) - :active (boundp 'ps-print-color-p)]) - ("%_Internet" - ("%_Compose Mail With" - ["VM mail package" - (customize-set-variable 'mail-user-agent 'vm-user-agent) - :style radio - :selected (eq mail-user-agent 'vm-user-agent) - :active (get 'vm-user-agent 'composefunc)] - ["Bare-bones 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 - 'user-mail-address - (read-string "Set email address: " user-mail-address))] - ["Set %_Machine Email Name..." - (customize-set-variable - 'mail-host-address - (read-string "Set machine email name: " mail-host-address))] - ["Set %_SMTP Server..." - (progn - (require 'smtpmail) - (customize-set-variable - 'smtpmail-smtp-server - (read-string "Set SMTP server: " smtpmail-smtp-server))) - :active (and (boundp 'send-mail-function) - (eq send-mail-function 'smtpmail-send-it))] - ["SMTP %_Debug Info" - (progn - (require 'smtpmail) - (customize-set-variable 'smtpmail-debug-info - (not smtpmail-debug-info))) - :style toggle - :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info) - :active (and (boundp 'send-mail-function) - (eq send-mail-function 'smtpmail-send-it))]) - ("%_Troubleshooting" - ["%_Debug on Error [not saved]" - (setq debug-on-error (not debug-on-error)) - :style toggle :selected debug-on-error] - ["Debug on %_Quit [not saved]" - (setq debug-on-quit (not debug-on-quit)) - :style toggle :selected debug-on-quit] - ["Debug on S%_ignal [not saved]" - (setq debug-on-signal (not debug-on-signal)) - :style toggle :selected debug-on-signal] - ["%_Stack Trace on Error [not saved]" - (setq stack-trace-on-error (not stack-trace-on-error)) - :style toggle :selected stack-trace-on-error] - ["Stack Trace on Si%_gnal [not saved]" - (setq stack-trace-on-signal (not stack-trace-on-signal)) - :style toggle :selected stack-trace-on-signal] + ["Set My %_Email Address..." + (customize-set-variable + 'user-mail-address + (read-string "Set email address: " user-mail-address))] + ["Set %_Machine Email Name..." + (customize-set-variable + 'mail-host-address + (read-string "Set machine email name: " mail-host-address))] + ["Set %_SMTP Server..." + (progn + (require 'smtpmail) + (customize-set-variable + 'smtpmail-smtp-server + (read-string "Set SMTP server: " smtpmail-smtp-server))) + :active (and (boundp 'send-mail-function) + (eq send-mail-function 'smtpmail-send-it))] + ["SMTP %_Debug Info" + (progn + (require 'smtpmail) + (customize-set-variable 'smtpmail-debug-info + (not smtpmail-debug-info))) + :style toggle + :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info) + :active (and (boundp 'send-mail-function) + (eq send-mail-function 'smtpmail-send-it))]) + ("%_Troubleshooting" + ["%_Debug on Error [not saved]" + (setq debug-on-error (not debug-on-error)) + :style toggle :selected debug-on-error] + ["Debug on %_Quit [not saved]" + (setq debug-on-quit (not debug-on-quit)) + :style toggle :selected debug-on-quit] + ["Debug on S%_ignal [not saved]" + (setq debug-on-signal (not debug-on-signal)) + :style toggle :selected debug-on-signal] + ["%_Stack Trace on Error [not saved]" + (setq stack-trace-on-error (not stack-trace-on-error)) + :style toggle :selected stack-trace-on-error] + ["Stack Trace on Si%_gnal [not saved]" + (setq stack-trace-on-signal (not stack-trace-on-signal)) + :style toggle :selected stack-trace-on-signal] + ) + ("Encodin%_g" + ["Automatic %_EOL Detection" + (customize-set-variable 'eol-detection-enabled-p + (not eol-detection-enabled-p)) + :style toggle + :selected eol-detection-enabled-p + :included (not (memq system-type '(windows-nt cygwin32)))] + ("Set Coding System of %_Buffer File" + :filter + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (set-buffer-file-coding-system entry)) + (lambda (entry) t)))) + ;; not implemented yet + ("Set Coding System of %_Terminal" + :filter + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (set-terminal-coding-system entry)) + (lambda (entry) nil))) ) - ("Encodin%_g" - ["Automatic %_EOL Detection" - (customize-set-variable 'eol-detection-enabled-p - (not eol-detection-enabled-p)) - :style toggle - :selected eol-detection-enabled-p - :included (not (memq system-type '(windows-nt cygwin32)))] - ("Set Coding System of %_Buffer File" - :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (set-buffer-file-coding-system entry)) - (lambda (entry) t) - )) - ) - ;; not implemented yet - ("Set Coding System of %_Terminal" - :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (set-terminal-coding-system entry)) - (lambda (entry) nil) - )) - ) - ;; not implemented yet - ("Set Coding System of %_Keyboard" - :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (set-keyboard-coding-system entry)) - (lambda (entry) nil) - )) - ) - ("Set Coding System of %_Process" - :filter - (lambda (menu) - (coding-system-menu-filter - (lambda (entry) - (set-buffer-process-coding-system entry)) - (lambda (entry) (get-buffer-process (current-buffer))) - )) - ) + ;; not implemented yet + ("Set Coding System of %_Keyboard" + :filter + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (set-keyboard-coding-system entry)) + (lambda (entry) nil)))) + ("Set Coding System of %_Process" + :filter + ,#'(lambda (menu) + (coding-system-menu-filter + (lambda (entry) + (set-buffer-process-coding-system entry entry)) + (lambda (entry) (get-buffer-process (current-buffer))))))) + ,@(when (featurep 'mule) + `(("Internationa%_l" + ("Set %_Language Environment" + :filter + ,#'(lambda (menu) + (menu-split-long-menu-and-sort + (mapcar #'(lambda (entry) + `[ ,(car entry) + (set-language-environment ',(car entry)) + :style radio + :selected + ,(equal (car entry) + current-language-environment)]) + language-info-alist) + ))) + ["%_Toggle Input Method" toggle-input-method] + ["Select %_Input Method" set-input-method] + ))) + "-----" + ("%_Display" + ,@(if (featurep 'scrollbar) + '(["%_Scrollbars" + (customize-set-variable 'scrollbars-visible-p + (not scrollbars-visible-p)) + :style toggle + :selected scrollbars-visible-p])) + ["%_Wrap Long Lines" + (progn ;; becomes buffer-local + (setq truncate-lines (not truncate-lines)) + (customize-set-variable 'truncate-lines truncate-lines)) + :style toggle + :selected (not truncate-lines)] + "----" + ["%_3D Modeline" + (customize-set-variable 'modeline-3d-p + (not modeline-3d-p)) + :style toggle + :selected modeline-3d-p] + ("Modeline %_Horizontal Scrolling" + ["%_None" + (customize-set-variable 'modeline-scrolling-method nil) + :style radio + :selected (not modeline-scrolling-method)] + ["As %_Text" + (customize-set-variable 'modeline-scrolling-method t) + :style radio + :selected (eq modeline-scrolling-method t)] + ["As %_Scrollbar" + (customize-set-variable 'modeline-scrolling-method 'scrollbar) + :style radio + :selected (eq modeline-scrolling-method 'scrollbar)] ) - ,@(when (featurep 'mule) - '(("Internationa%_l" - ("Set %_Language Environment" - :filter - (lambda (menu) - (menu-split-long-menu-and-sort - (mapcar #'(lambda (entry) - `[ ,(car entry) - (set-language-environment ',(car entry)) - :style radio - :selected - ,(equal (car entry) - current-language-environment)]) - language-info-alist) - ))) - ["%_Toggle Input Method" toggle-input-method] - ["Select %_Input Method" set-input-method] - ))) + ,@(if (featurep 'toolbar) + '("---" + ["%_Toolbars Visible" + (customize-set-variable 'toolbar-visible-p + (not toolbar-visible-p)) + :style toggle + :selected toolbar-visible-p] + ["Toolbars Ca%_ptioned" + (customize-set-variable 'toolbar-captioned-p + (not toolbar-captioned-p)) + :style toggle + :active toolbar-visible-p + :selected toolbar-captioned-p] + ("Default Toolba%_r Location" + ["%_Top" + (customize-set-variable 'default-toolbar-position 'top) + :style radio + :active toolbar-visible-p + :selected (eq default-toolbar-position 'top)] + ["%_Bottom" + (customize-set-variable 'default-toolbar-position 'bottom) + :style radio + :active toolbar-visible-p + :selected (eq default-toolbar-position 'bottom)] + ["%_Left" + (customize-set-variable 'default-toolbar-position 'left) + :style radio + :active toolbar-visible-p + :selected (eq default-toolbar-position 'left)] + ["%_Right" + (customize-set-variable 'default-toolbar-position 'right) + :style radio + :active toolbar-visible-p + :selected (eq default-toolbar-position 'right)] + ) + )) + ,@(if (featurep 'gutter) + '("---" + ["B%_uffers Tab Visible" + (customize-set-variable 'gutter-buffers-tab-visible-p + (not gutter-buffers-tab-visible-p)) + :style toggle + :selected gutter-buffers-tab-visible-p] + ("Default %_Gutter Location" + ["%_Top" + (customize-set-variable 'default-gutter-position 'top) + :style radio + :selected (eq default-gutter-position 'top)] + ["%_Bottom" + (customize-set-variable 'default-gutter-position 'bottom) + :style radio + :selected (eq default-gutter-position 'bottom)] + ["%_Left" + (customize-set-variable 'default-gutter-position 'left) + :style radio + :selected (eq default-gutter-position 'left)] + ["%_Right" + (customize-set-variable 'default-gutter-position 'right) + :style radio + :selected (eq default-gutter-position 'right)] + ) + )) "-----" - ("%_Display" - ,@(if (featurep 'scrollbar) - '(["%_Scrollbars" - (customize-set-variable 'scrollbars-visible-p - (not scrollbars-visible-p)) - :style toggle - :selected scrollbars-visible-p])) - ["%_Wrap Long Lines" - (progn;; becomes buffer-local - (setq truncate-lines (not truncate-lines)) - (customize-set-variable 'truncate-lines truncate-lines)) - :style toggle - :selected (not truncate-lines)] - "----" - ["%_3D Modeline" - (customize-set-variable 'modeline-3d-p - (not modeline-3d-p)) - :style toggle - :selected modeline-3d-p] - ("Modeline %_Horizontal Scrolling" - ["%_None" - (customize-set-variable 'modeline-scrolling-method nil) - :style radio - :selected (not modeline-scrolling-method)] - ["As %_Text" - (customize-set-variable 'modeline-scrolling-method t) - :style radio - :selected (eq modeline-scrolling-method t)] - ["As %_Scrollbar" - (customize-set-variable 'modeline-scrolling-method 'scrollbar) - :style radio - :selected (eq modeline-scrolling-method 'scrollbar)] - ) - ,@(if (featurep 'toolbar) - '("---" - ["%_Toolbars Visible" - (customize-set-variable 'toolbar-visible-p - (not toolbar-visible-p)) - :style toggle - :selected toolbar-visible-p] - ["Toolbars Ca%_ptioned" - (customize-set-variable 'toolbar-captioned-p - (not toolbar-captioned-p)) - :style toggle - :active toolbar-visible-p - :selected toolbar-captioned-p] - ("Default Toolba%_r Location" - ["%_Top" - (customize-set-variable 'default-toolbar-position 'top) - :style radio - :active toolbar-visible-p - :selected (eq default-toolbar-position 'top)] - ["%_Bottom" - (customize-set-variable 'default-toolbar-position 'bottom) - :style radio - :active toolbar-visible-p - :selected (eq default-toolbar-position 'bottom)] - ["%_Left" - (customize-set-variable 'default-toolbar-position 'left) - :style radio - :active toolbar-visible-p - :selected (eq default-toolbar-position 'left)] - ["%_Right" - (customize-set-variable 'default-toolbar-position 'right) - :style radio - :active toolbar-visible-p - :selected (eq default-toolbar-position 'right)] - ) - )) - ,@(if (featurep 'gutter) - '("---" - ["B%_uffers Tab Visible" - (customize-set-variable 'gutter-buffers-tab-visible-p - (not gutter-buffers-tab-visible-p)) - :style toggle - :selected gutter-buffers-tab-visible-p] - ("Default %_Gutter Location" - ["%_Top" - (customize-set-variable 'default-gutter-position 'top) - :style radio - :selected (eq default-gutter-position 'top)] - ["%_Bottom" - (customize-set-variable 'default-gutter-position 'bottom) - :style radio - :selected (eq default-gutter-position 'bottom)] - ["%_Left" - (customize-set-variable 'default-gutter-position 'left) - :style radio - :selected (eq default-gutter-position 'left)] - ["%_Right" - (customize-set-variable 'default-gutter-position 'right) - :style radio - :selected (eq default-gutter-position 'right)] - ) - )) - "-----" - ["%_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)] - ["Bl%_ock Cursor" - (progn - (customize-set-variable 'bar-cursor nil) - (force-cursor-redisplay)) - :style radio - :selected (null bar-cursor)] - ["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)" - (progn - (customize-set-variable 'bar-cursor 2) - (force-cursor-redisplay)) - :style radio - :selected (and bar-cursor (not (eq bar-cursor t)))] - "----" - ("Pa%_ren Highlighting" + ["%_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)] + ["Bl%_ock Cursor" + (progn + (customize-set-variable 'bar-cursor nil) + (force-cursor-redisplay)) + :style radio + :selected (null bar-cursor)] + ["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)" + (progn + (customize-set-variable 'bar-cursor 2) + (force-cursor-redisplay)) + :style radio + :selected (and bar-cursor (not (eq bar-cursor t)))] + "----" + ("Pa%_ren Highlighting" ["%_None" (customize-set-variable 'paren-mode nil) :style radio @@ -1160,418 +1154,427 @@ ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) ;; :active (boundp 'paren-mode)] ) - "------" - ["%_Line Numbers" - (progn - (customize-set-variable 'line-number-mode (not line-number-mode)) - (redraw-modeline)) - :style toggle :selected line-number-mode] - ["%_Column Numbers" - (progn - (customize-set-variable 'column-number-mode - (not column-number-mode)) - (redraw-modeline)) - :style toggle :selected column-number-mode] + "------" + ["%_Line Numbers" + (progn + (customize-set-variable 'line-number-mode (not line-number-mode)) + (redraw-modeline)) + :style toggle :selected line-number-mode] + ["%_Column Numbers" + (progn + (customize-set-variable 'column-number-mode + (not column-number-mode)) + (redraw-modeline)) + :style toggle :selected column-number-mode] - ("\"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..." + ("\"Other %_Window\" Location" + ["%_Always in Same Frame" (customize-set-variable - 'buffers-menu-max-size - ;; would it be better to open a customization buffer ? - (let ((val - (read-number - "Enter number of buffers to display (or 0 for unlimited): "))) - (if (eq val 0) nil val)))] - ["%_Multi-Operation Buffers Sub-Menus" - (customize-set-variable 'complex-buffers-menu-p - (not complex-buffers-menu-p)) - :style toggle - :selected complex-buffers-menu-p] - ["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" - (progn - (customize-set-variable 'buffers-menu-sort-function - 'sort-buffers-menu-alphabetically) - (customize-set-variable 'buffers-menu-grouping-function nil)) - :style radio - :selected (eq 'sort-buffers-menu-alphabetically - buffers-menu-sort-function)] - ["%_By Major Mode, Then Alphabetically" - (progn - (customize-set-variable - 'buffers-menu-sort-function - 'sort-buffers-menu-by-mode-then-alphabetically) - (customize-set-variable - 'buffers-menu-grouping-function - 'group-buffers-menu-by-mode-then-alphabetically)) - :style radio - :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically - buffers-menu-sort-function)]) - "---" - ["%_Ignore Scaled Fonts" - (customize-set-variable 'font-menu-ignore-scaled-fonts - (not font-menu-ignore-scaled-fonts)) - :style toggle - :selected (and (boundp 'font-menu-ignore-scaled-fonts) - font-menu-ignore-scaled-fonts)] - ) - ("S%_yntax Highlighting" - ["%_In This Buffer" - (progn;; becomes buffer local - (font-lock-mode) - (customize-set-variable 'font-lock-mode font-lock-mode)) + '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 '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)] - "-----" - ["Force %_Rehighlight in this Buffer" - (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" + :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 ? + (let ((val + (read-number + "Enter number of buffers to display (or 0 for unlimited): "))) + (if (eq val 0) nil val)))] + ["%_Multi-Operation Buffers Sub-Menus" + (customize-set-variable 'complex-buffers-menu-p + (not complex-buffers-menu-p)) + :style toggle + :selected complex-buffers-menu-p] + ["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 - (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)) + (customize-set-variable 'buffers-menu-sort-function nil) + (customize-set-variable 'buffers-menu-grouping-function nil)) :style radio - :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) - :active (boundp 'font-lock-mode)] - "-----" - ["%_1 Least" + :selected (null buffers-menu-sort-function)] + ["%_Alphabetically" (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))) + (customize-set-variable 'buffers-menu-sort-function + 'sort-buffers-menu-alphabetically) + (customize-set-variable 'buffers-menu-grouping-function nil)) :style radio - :active (fboundp 'font-lock-mode) - :selected (and (boundp 'font-lock-maximum-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))))] - ["%_2 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-maximum-decoration) - (integerp font-lock-maximum-decoration) - (= 1 font-lock-maximum-decoration))] - ["%_3 Even More" + :selected (eq 'sort-buffers-menu-alphabetically + buffers-menu-sort-function)] + ["%_By Major Mode, Then Alphabetically" (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))] - ["%_4 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))) + (customize-set-variable + 'buffers-menu-sort-function + 'sort-buffers-menu-by-mode-then-alphabetically) + (customize-set-variable + 'buffers-menu-grouping-function + 'group-buffers-menu-by-mode-then-alphabetically)) :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 %_Lock" - (progn;; becomes buffer local - (lazy-lock-mode) - (customize-set-variable 'lazy-lock-mode lazy-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 'lazy-lock-mode) - font-lock-mode) - :style toggle - :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)] - ["Lazy %_Shot" - (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)] - ) - ("%_Font" :filter font-menu-family-constructor) - ("Font Si%_ze" :filter font-menu-size-constructor) - ;; ("Font Weig%_ht" :filter font-menu-weight-constructor) - ["Edit Fa%_ces..." (customize-face nil)] + :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically + buffers-menu-sort-function)]) + "---" + ["%_Ignore Scaled Fonts" + (customize-set-variable 'font-menu-ignore-scaled-fonts + (not font-menu-ignore-scaled-fonts)) + :style toggle + :selected (and (boundp 'font-menu-ignore-scaled-fonts) + font-menu-ignore-scaled-fonts)] + ) + ("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 '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)] + "-----" + ["Force %_Rehighlight in this Buffer" + (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)] "-----" - ["Edit I%_nit File" - ;; #### there should be something that holds the name that the init - ;; file should be created as, when it's not present. - (let ((el-file (or user-init-file "~/.xemacs/init.el"))) - (if (string-match "\\.elc$" el-file) - (setq el-file - (substring user-init-file 0 (1- (length el-file))))) - (find-file el-file) - (or (eq major-mode 'emacs-lisp-mode) - (emacs-lisp-mode)))] - ["%_Save Options to Custom File" customize-save-customized] + ["%_1 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-maximum-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))))] + ["%_2 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-maximum-decoration) + (integerp font-lock-maximum-decoration) + (= 1 font-lock-maximum-decoration))] + ["%_3 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))] + ["%_4 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 %_Lock" + (progn ;; becomes buffer local + (lazy-lock-mode) + (customize-set-variable 'lazy-lock-mode lazy-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 'lazy-lock-mode) + font-lock-mode) + :style toggle + :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)] + ["Lazy %_Shot" + (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)] ) + ("%_Font" :filter font-menu-family-constructor) + ("Font Si%_ze" :filter font-menu-size-constructor) + ;; ("Font Weig%_ht" :filter font-menu-weight-constructor) + ["Edit Fa%_ces..." (customize-face nil)] + "-----" + ["Edit I%_nit File" + ;; #### there should be something that holds the name that the init + ;; file should be created as, when it's not present. + (let ((el-file (or user-init-file "~/.xemacs/init.el")) + el-file-directory) + (if (string-match "\\.elc$" el-file) + (setq el-file + (substring user-init-file 0 (1- (length el-file))))) + (unless (file-directory-p + (setq el-file-directory (file-name-directory el-file))) + (message "Creating %s... " el-file-directory) + (make-directory el-file-directory t) + (message "Creating %s... done." el-file-directory)) + (find-file el-file) + (or (eq major-mode 'emacs-lisp-mode) + (emacs-lisp-mode)))] + ["%_Save Options to Custom File" customize-save-customized] + ) ("%_Buffers" - :filter buffers-menu-filter - ["Go To %_Previous Buffer" switch-to-other-buffer] - ["Go To %_Buffer..." switch-to-buffer] - "----" - ["%_List All Buffers" list-all-buffers] - ["%_Delete Buffer" kill-this-buffer - :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] - "----" - ) + :filter buffers-menu-filter + ["Go To %_Previous Buffer" switch-to-other-buffer] + ["Go To %_Buffer..." switch-to-buffer] + "----" + ["%_List All Buffers" list-all-buffers] + ["%_Delete Buffer" kill-this-buffer + :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] + "----" + ) - nil ; the partition: menus after this are flushright + nil ; the partition: menus after this are flushright ("%_Help" - ["%_About XEmacs..." about-xemacs] - ["%_Home Page (www.xemacs.org)" xemacs-www-page - :active (fboundp 'browse-url)] - ["What's %_New in XEmacs" view-emacs-news] - ["B%_eta Info" describe-beta - :included (string-match "beta" emacs-version)] + ["%_About XEmacs..." about-xemacs] + ["%_Home Page (www.xemacs.org)" xemacs-www-page + :active (fboundp 'browse-url)] + ["What's %_New in XEmacs" view-emacs-news] + ["B%_eta Info" describe-beta + :included (string-match "beta" emacs-version)] + "-----" + ("%_Info (Online Docs)" + ["%_Info Contents" (Info-goto-node "(dir)")] + "-----" + ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")] + ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")] + ["All About %_Packages" (Info-goto-node "(xemacs)Packages")] + ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")] + ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")] + ["%_How to Use Info" (Info-goto-node "(Info)")] + "-----" + ["Lookup %_Key Sequence in User's Manual..." + Info-goto-emacs-key-command-node] + ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node] + ["Lookup %_Function in Lisp Reference..." Info-elisp-ref] "-----" - ("%_Info (Online Docs)" - ["%_Info Contents" (Info-goto-node "(dir)")] - "-----" - ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")] - ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")] - ["All About %_Packages" (Info-goto-node "(xemacs)Packages")] - ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")] - ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")] - ["%_How to Use Info" (Info-goto-node "(Info)")] - "-----" - ["Lookup %_Key Sequence in User's Manual..." - Info-goto-emacs-key-command-node] - ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node] - ["Lookup %_Function in Lisp Reference..." Info-elisp-ref] - "-----" - ["Find %_Topic in User's Manual/Lispref..." - Info-search-index-in-xemacs-and-lispref] - ["%_Search Text in User's Manual..." Info-search-text-in-xemacs] - ["S%_earch Text in Lisp Reference..." - Info-search-text-in-lispref] - ) - ("XEmacs %_FAQ" - ["%_FAQ (local)" xemacs-local-faq] - ["FAQ via %_WWW" xemacs-www-faq - :active (fboundp 'browse-url)]) - ("%_Tutorials" - :filter tutorials-menu-filter) - ("%_Samples" - ["View Sample %_init.el" view-sample-init-el - :active (locate-data-file "sample.init.el")] - ["View Sample .%_gtkrc" - (Help-find-file (locate-data-file "sample.gtkrc")) - :included (featurep 'gtk) - :active (locate-data-file "sample.gtkrc")] - ["View Sample .%_Xresources" - (Help-find-file (locate-data-file "sample.Xresources")) - :included (featurep 'x) - :active (locate-data-file "sample.Xresources")] - ["View Sample %_enriched.doc" - (Help-find-file (locate-data-file "enriched.doc")) - :active (locate-data-file "enriched.doc")]) - ("%_Commands, Variables, Keys" - ["Describe %_Mode" describe-mode] - ["%_Apropos..." hyper-apropos] - ["%_Command-Only Apropos..." command-hyper-apropos] - ["Apropos %_Docs..." apropos-documentation] - "-----" - ["Describe %_Key..." describe-key] - ["Show %_Bindings" describe-bindings] - ["Show M%_ouse Bindings" describe-pointer] - "-----" - ["Describe %_Function..." describe-function] - ["Describe %_Variable..." describe-variable] - ["%_Locate Command in Keymap..." where-is]) - ,@(when (featurep 'mule) - '(("Internationa%_l" - ("Describe %_Language Support" - :filter - (lambda (menu) - (menu-split-long-menu-and-sort - (mapcar #'(lambda (entry) - `[ ,(car entry) - (describe-language-environment - ',(car entry)) - :style radio - :selected - ,(equal (car entry) - current-language-environment)]) - language-info-alist) - ))) - ["Describe %_Input Method" describe-input-method] - ["Describe Current %_Coding Systems" - describe-current-coding-system] - ["Show Character %_Table" view-charset-by-menu] - ;; not implemented yet - ["Show %_Diagnosis for MULE" mule-diag :active nil] - ["Show \"%_hello\" in Many Languages" view-hello-file] - ))) - ("%_Other" - ["%_Current Installation Info" describe-installation - :active (boundp 'Installation-string)] - ["%_Known Problems" view-xemacs-problems ] - ["%_Obtaining the Latest Version" describe-distribution] - ["%_No Warranty" describe-no-warranty] - ["XEmacs %_License" describe-copying] - ["Find %_Packages" finder-by-keyword] - ["View %_Splash Screen" xemacs-splash-buffer] - ["%_Unix Manual..." manual-entry]) + ["Find %_Topic in User's Manual/Lispref..." + Info-search-index-in-xemacs-and-lispref] + ["%_Search Text in User's Manual..." Info-search-text-in-xemacs] + ["S%_earch Text in Lisp Reference..." + Info-search-text-in-lispref] + ) + ("XEmacs %_FAQ" + ["%_FAQ (local)" xemacs-local-faq] + ["FAQ via %_WWW" xemacs-www-faq + :active (fboundp 'browse-url)]) + ("%_Tutorials" + :filter tutorials-menu-filter) + ("%_Samples" + ["View Sample %_init.el" view-sample-init-el + :active (locate-data-file "sample.init.el")] + ["View Sample .%_gtkrc" + (Help-find-file (locate-data-file "sample.gtkrc")) + :included (featurep 'gtk) + :active (locate-data-file "sample.gtkrc")] + ["View Sample .%_Xresources" + (Help-find-file (locate-data-file "sample.Xresources")) + :included (featurep 'x) + :active (locate-data-file "sample.Xresources")] + ["View Sample %_enriched.doc" + (Help-find-file (locate-data-file "enriched.doc")) + :active (locate-data-file "enriched.doc")]) + ("%_Commands, Variables, Keys" + ["Describe %_Mode" describe-mode] + ["%_Apropos..." hyper-apropos] + ["%_Command-Only Apropos..." command-hyper-apropos] + ["Apropos %_Docs..." apropos-documentation] + "-----" + ["Describe %_Key..." describe-key] + ["Show %_Bindings" describe-bindings] + ["Show M%_ouse Bindings" describe-pointer] "-----" - ["Recent %_Messages" (view-lossage t)] - ["Recent %_Keystrokes" view-lossage] - ["Recent %_Warnings" view-warnings] - ["Send %_Bug Report..." report-xemacs-bug - :active (fboundp 'report-xemacs-bug)]))) + ["Describe %_Function..." describe-function] + ["Describe %_Variable..." describe-variable] + ["%_Locate Command in Keymap..." where-is]) + ,@(when (featurep 'mule) + `(("Internationa%_l" + ("Describe %_Language Support" + :filter + ,#'(lambda (menu) + (menu-split-long-menu-and-sort + (mapcar #'(lambda (entry) + `[ ,(car entry) + (describe-language-environment + ',(car entry)) + :style radio + :selected + ,(equal (car entry) + current-language-environment)]) + language-info-alist) + ))) + ["Describe %_Input Method" describe-input-method] + ["Describe Current %_Coding Systems" + describe-current-coding-system] + ["Show Character %_Table" view-charset-by-menu] + ;; not implemented yet + ["Show %_Diagnosis for MULE" mule-diag :active nil] + ["Show \"%_hello\" in Many Languages" view-hello-file] + ))) + ("%_Other" + ["%_Current Installation Info" describe-installation + :active (boundp 'Installation-string)] + ["%_Known Problems" view-xemacs-problems ] + ["%_Obtaining the Latest Version" describe-distribution] + ["%_No Warranty" describe-no-warranty] + ["XEmacs %_License" describe-copying] + ["Find %_Packages" finder-by-keyword] + ["View %_Splash Screen" xemacs-splash-buffer] + ["%_Unix Manual..." manual-entry]) + "-----" + ["Recent %_Messages" (view-lossage t)] + ["Recent %_Keystrokes" view-lossage] + ["Recent %_Warnings" view-warnings] + ["Send %_Bug Report..." report-xemacs-bug + :active (fboundp 'report-xemacs-bug)])) + "The default XEmacs menubar. +See the documentation for `current-menubar' for details of the syntax +used here.") (defun init-menubar-at-startup () @@ -1929,6 +1932,11 @@ ;; included it first (not (string= (car lang) current-language-environment)) + ;; Hackish approach; if a language environment + ;; doesn't have associated locale information, + ;; it's not the preferred implementation for that + ;; language. Don't use it. + (assq 'locale lang) `([,(car lang) (help-with-tutorial nil ,(car lang))])))) language-info-alist) diff -r 71bf2c5667ba -r 66411359ce4e lisp/menubar.el --- a/lisp/menubar.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/menubar.el Sat Oct 25 21:40:46 2008 +0900 @@ -568,6 +568,7 @@ accelerator specs -- this works even if the specs have already been added." (menu-split-long-menu (menu-sort-menu menu))) +;;;###autoload (defun menu-split-long-menu (menu) "Split MENU according to `menu-max-items' and add accelerator specs. If MENU already has accelerator specs, they will be removed and new ones diff -r 71bf2c5667ba -r 66411359ce4e lisp/minibuf.el --- a/lisp/minibuf.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/minibuf.el Sat Oct 25 21:40:46 2008 +0900 @@ -2057,22 +2057,18 @@ (let* ((file-p (eq 'read-file-name-internal completer)) (filebuf (get-buffer-create "*Completions*")) (dirbuf (and file-p (generate-new-buffer " *mouse-read-file*"))) - (butbuf (generate-new-buffer " *mouse-read-file*")) + (butbuf (generate-new-buffer " *mouse-read-file-buttons*")) (frame (make-dialog-frame)) filewin dirwin - user-data) + user-data + (window-min-height 1)) ; allow button window to be height 2 (unwind-protect (progn (reset-buffer filebuf) ;; 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 - ;; people (but not for me ...) There's a more - ;; fundamental bug somewhere. - (split-window nil (- (frame-height frame) 3))) + (split-window nil (- (window-height) 2)) (if file-p (progn (split-window-horizontally 16) @@ -2095,7 +2091,7 @@ ;; any more. --ben (lambda () (mouse-rfn-setup-vars prompt) - (when (featurep 'scrollbar) + (when-boundp #'scrollbar-width (set-specifier scrollbar-width 0 (current-buffer))) (setq truncate-lines t)))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/modeline.el --- a/lisp/modeline.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/modeline.el Sat Oct 25 21:40:46 2008 +0900 @@ -827,10 +827,9 @@ (defconst modeline-tty-frame-specifier (make-specifier 'boolean)) (add-hook 'create-frame-hook 'modeline-update-tty-frame-specifier) (defun modeline-update-tty-frame-specifier (f) - (if-fboundp 'frame-tty-p - (if (and (frame-tty-p f) - (> (frame-property f 'frame-number) 1)) - (set-specifier modeline-tty-frame-specifier t f)))) + (if (and (eq (frame-type f) 'tty) + (> (frame-property f 'frame-number) 1)) + (set-specifier modeline-tty-frame-specifier t f))) (define-modeline-control tty-frame-id (list modeline-tty-frame-specifier " [%S]" diff -r 71bf2c5667ba -r 66411359ce4e lisp/msw-faces.el --- a/lisp/msw-faces.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/msw-faces.el Sat Oct 25 21:40:46 2008 +0900 @@ -68,7 +68,9 @@ ;; Other functions expect these regexps (let ((- ":") - (fontname "\\([a-zA-Z ]*\\)") ; 1 + ;; What happens if a font family contains a colon? I can't find any + ;; documentation on that, and don't have a font editor to hand to test. + (fontname "\\([^:]*\\)") ; 1 (style "\\(\\(?:[a-zA-Z]+\\(?: +[a-zA-Z]+\\)*\\)?\\)") ; 2 (pointsize "\\([0-9]*\\)") ; 3 (effects "\\(\\(?:[a-zA-Z]+\\(?: +[a-zA-Z]+\\)*\\)?\\)") ; 4 diff -r 71bf2c5667ba -r 66411359ce4e lisp/msw-font-menu.el --- a/lisp/msw-font-menu.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/msw-font-menu.el Sat Oct 25 21:40:46 2008 +0900 @@ -48,6 +48,10 @@ (require 'font-menu) (globally-declare-boundp 'mswindows-font-regexp) +(globally-declare-fboundp + '(mswindows-parse-font-style + mswindows-construct-font-style)) + (defvar mswindows-font-menu-junk-families (mapconcat #'identity diff -r 71bf2c5667ba -r 66411359ce4e lisp/msw-init.el --- a/lisp/msw-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/msw-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -23,26 +23,15 @@ ;; Free Software Foundation, 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. -(defvar mswindows-win-initted nil) -(defvar mswindows-pre-win-initted nil) -(defvar mswindows-post-win-initted nil) - -(defun init-pre-mswindows-win () - "Initialize mswindows GUI at startup (pre). Don't call this." - (unless mswindows-pre-win-initted - (setq mswindows-pre-win-initted t))) +(defvar make-device-early-mswindows-entry-point-called-p nil + "Whether `make-device-early-mswindows-entry-point' has been called") -(defun init-mswindows-win () - "Initialize mswindows GUI at startup. Don't call this." - (unless mswindows-win-initted - (init-pre-mswindows-win) - (make-mswindows-device) - (init-post-mswindows-win (selected-console)) - (setq mswindows-win-initted t))) +(defvar make-device-late-mswindows-entry-point-called-p nil + "Whether `make-device-late-mswindows-entry-point' has been called") -(defun init-post-mswindows-win (console) - "Initialize mswindows GUI at startup (post). Don't call this." - (unless mswindows-post-win-initted +(defun make-device-early-mswindows-entry-point () + "Lisp code called before an `mswindows' device is created." + (unless make-device-early-mswindows-entry-point-called-p ;; Old-style mswindows bindings. The new-style mswindows bindings ;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs. (global-set-key '(shift delete) 'kill-primary-selection) @@ -50,6 +39,10 @@ (global-set-key '(control insert) 'copy-primary-selection) (global-set-key '(meta f4) 'save-buffers-kill-emacs) + (setq make-device-early-mswindows-entry-point-called-p t))) - (setq mswindows-post-win-initted t))) +(defun make-device-late-mswindows-entry-point (device) + "Lisp code called after an `mswindows' device is created." + (unless make-device-late-mswindows-entry-point-called-p + (setq make-device-late-mswindows-entry-point-called-p t))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/arabic.el --- a/lisp/mule/arabic.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/arabic.el Sat Oct 25 21:40:46 2008 +0900 @@ -28,79 +28,204 @@ ;;; Code: -; (make-charset 'arabic-iso8859-6 -; "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127" -; '(dimension -; 1 -; registry "ISO8859-6" -; chars 96 -; columns 1 -; direction r2l -; final ?G -; graphic 1 -; short-name "RHP of ISO8859/6" -; long-name "RHP of Arabic (ISO 8859-6): ISO-IR-127" -; )) +;; See iso-with-esc.el for commentary on the ISO standard Arabic character +;; set. -;; For Arabic, we need three different types of character sets. -;; Digits are of direction left-to-right and of width 1-column. -;; Others are of direction right-to-left and of width 1-column or -;; 2-column. -(make-charset 'arabic-digit "Arabic digit" - '(dimension 1 - registries ["MuleArabic-0"] - chars 94 - columns 1 - direction l2r - final ?2 - graphic 0 - short-name "Arabic digit" - long-name "Arabic digit" - )) +(make-8-bit-coding-system + 'iso-8859-6 + '((#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xAC ?\u060C) ;; ARABIC COMMA + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xBB ?\u061B) ;; ARABIC SEMICOLON + (#xBF ?\u061F) ;; ARABIC QUESTION MARK + (#xC1 ?\u0621) ;; ARABIC LETTER HAMZA + (#xC2 ?\u0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 ?\u0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 ?\u0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 ?\u0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 ?\u0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 ?\u0627) ;; ARABIC LETTER ALEF + (#xC8 ?\u0628) ;; ARABIC LETTER BEH + (#xC9 ?\u0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA ?\u062A) ;; ARABIC LETTER TEH + (#xCB ?\u062B) ;; ARABIC LETTER THEH + (#xCC ?\u062C) ;; ARABIC LETTER JEEM + (#xCD ?\u062D) ;; ARABIC LETTER HAH + (#xCE ?\u062E) ;; ARABIC LETTER KHAH + (#xCF ?\u062F) ;; ARABIC LETTER DAL + (#xD0 ?\u0630) ;; ARABIC LETTER THAL + (#xD1 ?\u0631) ;; ARABIC LETTER REH + (#xD2 ?\u0632) ;; ARABIC LETTER ZAIN + (#xD3 ?\u0633) ;; ARABIC LETTER SEEN + (#xD4 ?\u0634) ;; ARABIC LETTER SHEEN + (#xD5 ?\u0635) ;; ARABIC LETTER SAD + (#xD6 ?\u0636) ;; ARABIC LETTER DAD + (#xD7 ?\u0637) ;; ARABIC LETTER TAH + (#xD8 ?\u0638) ;; ARABIC LETTER ZAH + (#xD9 ?\u0639) ;; ARABIC LETTER AIN + (#xDA ?\u063A) ;; ARABIC LETTER GHAIN + (#xE0 ?\u0640) ;; ARABIC TATWEEL + (#xE1 ?\u0641) ;; ARABIC LETTER FEH + (#xE2 ?\u0642) ;; ARABIC LETTER QAF + (#xE3 ?\u0643) ;; ARABIC LETTER KAF + (#xE4 ?\u0644) ;; ARABIC LETTER LAM + (#xE5 ?\u0645) ;; ARABIC LETTER MEEM + (#xE6 ?\u0646) ;; ARABIC LETTER NOON + (#xE7 ?\u0647) ;; ARABIC LETTER HEH + (#xE8 ?\u0648) ;; ARABIC LETTER WAW + (#xE9 ?\u0649) ;; ARABIC LETTER ALEF MAKSURA + (#xEA ?\u064A) ;; ARABIC LETTER YEH + (#xEB ?\u064B) ;; ARABIC FATHATAN + (#xEC ?\u064C) ;; ARABIC DAMMATAN + (#xED ?\u064D) ;; ARABIC KASRATAN + (#xEE ?\u064E) ;; ARABIC FATHA + (#xEF ?\u064F) ;; ARABIC DAMMA + (#xF0 ?\u0650) ;; ARABIC KASRA + (#xF1 ?\u0651) ;; ARABIC SHADDA + (#xF2 ?\u0652)) ;; ARABIC SUKUN + "ISO 8859-6 (Arabic)" +'(mnemonic "ArISO")) -(make-charset 'arabic-1-column "Arabic 1-column" - '(dimension - 1 - registries ["MuleArabic-1"] - chars 94 - columns 1 - direction r2l - final ?3 - graphic 0 - short-name "Arabic 1-col" - long-name "Arabic 1-column" - )) +(make-8-bit-coding-system + 'windows-1256 + '((#x80 ?\u20AC) ;; EURO SIGN + (#x81 ?\u067E) ;; ARABIC LETTER PEH + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0192) ;; LATIN SMALL LETTER F WITH HOOK + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x88 ?\u02C6) ;; MODIFIER LETTER CIRCUMFLEX ACCENT + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u0679) ;; ARABIC LETTER TTEH + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#x8D ?\u0686) ;; ARABIC LETTER TCHEH + (#x8E ?\u0698) ;; ARABIC LETTER JEH + (#x8F ?\u0688) ;; ARABIC LETTER DDAL + (#x90 ?\u06AF) ;; ARABIC LETTER GAF + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x98 ?\u06A9) ;; ARABIC LETTER KEHEH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9A ?\u0691) ;; ARABIC LETTER RREH + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u0153) ;; LATIN SMALL LIGATURE OE + (#x9D ?\u200C) ;; ZERO WIDTH NON-JOINER + (#x9E ?\u200D) ;; ZERO WIDTH JOINER + (#x9F ?\u06BA) ;; ARABIC LETTER NOON GHUNNA + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u060C) ;; ARABIC COMMA + (#xA2 ?\u00A2) ;; CENT SIGN + (#xA3 ?\u00A3) ;; POUND SIGN + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u00A5) ;; YEN SIGN + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xA8 ?\u00A8) ;; DIAERESIS + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAA ?\u06BE) ;; ARABIC LETTER HEH DOACHASHMEE + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xAF ?\u00AF) ;; MACRON + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u00B2) ;; SUPERSCRIPT TWO + (#xB3 ?\u00B3) ;; SUPERSCRIPT THREE + (#xB4 ?\u00B4) ;; ACUTE ACCENT + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB8 ?\u00B8) ;; CEDILLA + (#xB9 ?\u00B9) ;; SUPERSCRIPT ONE + (#xBA ?\u061B) ;; ARABIC SEMICOLON + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u00BC) ;; VULGAR FRACTION ONE QUARTER + (#xBD ?\u00BD) ;; VULGAR FRACTION ONE HALF + (#xBE ?\u00BE) ;; VULGAR FRACTION THREE QUARTERS + (#xBF ?\u061F) ;; ARABIC QUESTION MARK + (#xC0 ?\u06C1) ;; ARABIC LETTER HEH GOAL + (#xC1 ?\u0621) ;; ARABIC LETTER HAMZA + (#xC2 ?\u0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 ?\u0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 ?\u0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 ?\u0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 ?\u0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 ?\u0627) ;; ARABIC LETTER ALEF + (#xC8 ?\u0628) ;; ARABIC LETTER BEH + (#xC9 ?\u0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA ?\u062A) ;; ARABIC LETTER TEH + (#xCB ?\u062B) ;; ARABIC LETTER THEH + (#xCC ?\u062C) ;; ARABIC LETTER JEEM + (#xCD ?\u062D) ;; ARABIC LETTER HAH + (#xCE ?\u062E) ;; ARABIC LETTER KHAH + (#xCF ?\u062F) ;; ARABIC LETTER DAL + (#xD0 ?\u0630) ;; ARABIC LETTER THAL + (#xD1 ?\u0631) ;; ARABIC LETTER REH + (#xD2 ?\u0632) ;; ARABIC LETTER ZAIN + (#xD3 ?\u0633) ;; ARABIC LETTER SEEN + (#xD4 ?\u0634) ;; ARABIC LETTER SHEEN + (#xD5 ?\u0635) ;; ARABIC LETTER SAD + (#xD6 ?\u0636) ;; ARABIC LETTER DAD + (#xD7 ?\u00D7) ;; MULTIPLICATION SIGN + (#xD8 ?\u0637) ;; ARABIC LETTER TAH + (#xD9 ?\u0638) ;; ARABIC LETTER ZAH + (#xDA ?\u0639) ;; ARABIC LETTER AIN + (#xDB ?\u063A) ;; ARABIC LETTER GHAIN + (#xDC ?\u0640) ;; ARABIC TATWEEL + (#xDD ?\u0641) ;; ARABIC LETTER FEH + (#xDE ?\u0642) ;; ARABIC LETTER QAF + (#xDF ?\u0643) ;; ARABIC LETTER KAF + (#xE0 ?\u00E0) ;; LATIN SMALL LETTER A WITH GRAVE + (#xE1 ?\u0644) ;; ARABIC LETTER LAM + (#xE2 ?\u00E2) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX + (#xE3 ?\u0645) ;; ARABIC LETTER MEEM + (#xE4 ?\u0646) ;; ARABIC LETTER NOON + (#xE5 ?\u0647) ;; ARABIC LETTER HEH + (#xE6 ?\u0648) ;; ARABIC LETTER WAW + (#xE7 ?\u00E7) ;; LATIN SMALL LETTER C WITH CEDILLA + (#xE8 ?\u00E8) ;; LATIN SMALL LETTER E WITH GRAVE + (#xE9 ?\u00E9) ;; LATIN SMALL LETTER E WITH ACUTE + (#xEA ?\u00EA) ;; LATIN SMALL LETTER E WITH CIRCUMFLEX + (#xEB ?\u00EB) ;; LATIN SMALL LETTER E WITH DIAERESIS + (#xEC ?\u0649) ;; ARABIC LETTER ALEF MAKSURA + (#xED ?\u064A) ;; ARABIC LETTER YEH + (#xEE ?\u00EE) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX + (#xEF ?\u00EF) ;; LATIN SMALL LETTER I WITH DIAERESIS + (#xF0 ?\u064B) ;; ARABIC FATHATAN + (#xF1 ?\u064C) ;; ARABIC DAMMATAN + (#xF2 ?\u064D) ;; ARABIC KASRATAN + (#xF3 ?\u064E) ;; ARABIC FATHA + (#xF4 ?\u00F4) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX + (#xF5 ?\u064F) ;; ARABIC DAMMA + (#xF6 ?\u0650) ;; ARABIC KASRA + (#xF7 ?\u00F7) ;; DIVISION SIGN + (#xF8 ?\u0651) ;; ARABIC SHADDA + (#xF9 ?\u00F9) ;; LATIN SMALL LETTER U WITH GRAVE + (#xFA ?\u0652) ;; ARABIC SUKUN + (#xFB ?\u00FB) ;; LATIN SMALL LETTER U WITH CIRCUMFLEX + (#xFC ?\u00FC) ;; LATIN SMALL LETTER U WITH DIAERESIS + (#xFD ?\u200E) ;; LEFT-TO-RIGHT MARK + (#xFE ?\u200F) ;; RIGHT-TO-LEFT MARK + (#xFF ?\u06D2));; ARABIC LETTER YEH BARREE + "Windows-1256 (Arabic)" + '(mnemonic "cp1256" + documentation + "This is the much Windows encoding for Arabic, much superior to the ISO +standard one." + aliases (cp1256))) -(make-charset 'arabic-2-column "Arabic 2-column" - '(dimension - 1 - registries ["MuleArabic-2"] - chars 94 - columns 2 - direction r2l - final ?4 - graphic 0 - short-name "Arabic 2-col" - long-name "Arabic 2-column" - )) +;; The Mac Arabic coding systems don't have defined MIME names. -(make-coding-system 'iso-8859-6 'iso2022 - "ISO-8859-6 (Arabic)" - '(charset-g0 ascii - charset-g1 arabic-iso8859-6 - charset-g2 t - charset-g3 t - no-iso6429 t - mnemonic "MIME/Arbc" - )) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; ARABIC -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; (define-language-environment 'arabic -;; "Arabic" -;; (lambda () -;; (require 'arabic))) +;; #### Decide what to do about the syntax of the Arabic punctuation. ;;; arabic.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/ccl.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/mule/ccl.el Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,1565 @@ +;;; ccl.el --- CCL (Code Conversion Language) compiler -*- coding: iso-2022-7bit; -*- + +;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. +;; Licensed to the Free Software Foundation. +;; Copyright (C) 2002, 2007 Free Software Foundation, Inc. + +;; Keywords: CCL, mule, multilingual, character set, coding-system + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;; Synched up with: FSF 21.0.90 + +;;; Commentary: + +;; CCL (Code Conversion Language) is a simple programming language to +;; be used for various kind of code conversion. CCL program is +;; compiled to CCL code (vector of integers) and executed by CCL +;; interpreter of Emacs. +;; +;; CCL is used for code conversion at process I/O and file I/O for +;; non-standard coding-system. In addition, it is used for +;; calculating a code point of X's font from a character code. +;; However, since CCL is designed as a powerful programming language, +;; it can be used for more generic calculation. For instance, +;; combination of three or more arithmetic operations can be +;; calculated faster than Emacs Lisp. +;; +;; Syntax and semantics of CCL program is described in the +;; documentation of `define-ccl-program'. + +;;; Code: + +(defconst ccl-command-table + [if branch loop break repeat write-repeat write-read-repeat + read read-if read-branch write call end + read-multibyte-character write-multibyte-character + translate-character mule-to-unicode unicode-to-mule + iterate-multiple-map map-multiple map-single lookup-integer + lookup-character] + "Vector of CCL commands (symbols).") + +;; Put a property to each symbol of CCL commands for the compiler. +(let (op (i 0) (len (length ccl-command-table))) + (while (< i len) + (setq op (aref ccl-command-table i)) + (put op 'ccl-compile-function (intern (format "ccl-compile-%s" op))) + (setq i (1+ i)))) + +(defconst ccl-code-table + [set-register + set-short-const + set-const + set-array + jump + jump-cond + write-register-jump + write-register-read-jump + write-const-jump + write-const-read-jump + write-string-jump + write-array-read-jump + read-jump + branch + read-register + write-expr-const + read-branch + write-register + write-expr-register + call + write-const-string + write-array + end + set-assign-expr-const + set-assign-expr-register + set-expr-const + set-expr-register + jump-cond-expr-const + jump-cond-expr-register + read-jump-cond-expr-const + read-jump-cond-expr-register + ex-cmd + ] + "Vector of CCL compiled codes (symbols).") + +(defconst ccl-extended-code-table + [read-multibyte-character + write-multibyte-character + translate-character + translate-character-const-tbl + mule-to-unicode + unicode-to-mule + nil nil nil nil nil nil nil nil nil nil ; 0x06-0x0f + iterate-multiple-map + map-multiple + map-single + lookup-int-const-tbl + lookup-char-const-tbl + ] + "Vector of CCL extended compiled codes (symbols).") + +;; Put a property to each symbol of CCL codes for the disassembler. +(let (code (i 0) (len (length ccl-code-table))) + (while (< i len) + (setq code (aref ccl-code-table i)) + (put code 'ccl-code i) + (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))) + (setq i (1+ i)))) + +(let (code (i 0) (len (length ccl-extended-code-table))) + (while (< i len) + (setq code (aref ccl-extended-code-table i)) + (if code + (progn + (put code 'ccl-ex-code i) + (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))))) + (setq i (1+ i)))) + +(defconst ccl-jump-code-list + '(jump jump-cond write-register-jump write-register-read-jump + write-const-jump write-const-read-jump write-string-jump + write-array-read-jump read-jump)) + +;; Put a property `jump-flag' to each CCL code which execute jump in +;; some way. +(let ((l ccl-jump-code-list)) + (while l + (put (car l) 'jump-flag t) + (setq l (cdr l)))) + +(defconst ccl-register-table + [r0 r1 r2 r3 r4 r5 r6 r7] + "Vector of CCL registers (symbols).") + +;; Put a property to indicate register number to each symbol of CCL. +;; registers. +(let (reg (i 0) (len (length ccl-register-table))) + (while (< i len) + (setq reg (aref ccl-register-table i)) + (put reg 'ccl-register-number i) + (setq i (1+ i)))) + +(defconst ccl-arith-table + [+ - * / % & | ^ << >> <8 >8 // nil nil nil + < > == <= >= != de-sjis en-sjis] + "Vector of CCL arithmetic/logical operators (symbols).") + +;; Put a property to each symbol of CCL operators for the compiler. +(let (arith (i 0) (len (length ccl-arith-table))) + (while (< i len) + (setq arith (aref ccl-arith-table i)) + (if arith (put arith 'ccl-arith-code i)) + (setq i (1+ i)))) + +(defconst ccl-assign-arith-table + [+= -= *= /= %= &= |= ^= <<= >>= <8= >8= //=] + "Vector of CCL assignment operators (symbols).") + +;; Put a property to each symbol of CCL assignment operators for the compiler. +(let (arith (i 0) (len (length ccl-assign-arith-table))) + (while (< i len) + (setq arith (aref ccl-assign-arith-table i)) + (put arith 'ccl-self-arith-code i) + (setq i (1+ i)))) + +(defvar ccl-program-vector nil + "Working vector of CCL codes produced by CCL compiler.") +(defvar ccl-current-ic 0 + "The current index for `ccl-program-vector'.") + +;; Embed integer DATA in `ccl-program-vector' at `ccl-current-ic' and +;; increment it. If IC is specified, embed DATA at IC. +(defun ccl-embed-data (data &optional ic) + ;; XEmacs: Embed characters as characters, since their integer values vary at + ;; runtime. + ; (if (characterp data) + ; (setq data (char-int data))) + (if ic + (aset ccl-program-vector ic data) + (let ((len (length ccl-program-vector))) + (if (>= ccl-current-ic len) + (let ((new (make-vector (* len 2) nil))) + (while (> len 0) + (setq len (1- len)) + (aset new len (aref ccl-program-vector len))) + (setq ccl-program-vector new)))) + (aset ccl-program-vector ccl-current-ic data) + (setq ccl-current-ic (1+ ccl-current-ic)))) + +;; Embed pair of SYMBOL and PROP where (get SYMBOL PROP) should give +;; proper index number for SYMBOL. PROP should be +;; `translation-table-id', `translation-hash-table-id' +;; `code-conversion-map-id', or `ccl-program-idx'. +(defun ccl-embed-symbol (symbol prop) + (ccl-embed-data (cons symbol prop))) + +;; Embed string STR of length LEN in `ccl-program-vector' at +;; `ccl-current-ic'. +(defun ccl-embed-string (len str) + (let ((i 0)) + (while (< i len) + (ccl-embed-data (logior (ash (aref str i) 16) + (if (< (1+ i) len) + (ash (aref str (1+ i)) 8) + 0) + (if (< (+ i 2) len) + (aref str (+ i 2)) + 0))) + (setq i (+ i 3))))) + +;; Embed a relative jump address to `ccl-current-ic' in +;; `ccl-program-vector' at IC without altering the other bit field. +(defun ccl-embed-current-address (ic) + (let ((relative (- ccl-current-ic (1+ ic)))) + (aset ccl-program-vector ic + (logior (aref ccl-program-vector ic) (ash relative 8))))) + +;; Embed CCL code for the operation OP and arguments REG and DATA in +;; `ccl-program-vector' at `ccl-current-ic' in the following format. +;; |----------------- integer (28-bit) ------------------| +;; |------------ 20-bit ------------|- 3-bit --|- 5-bit -| +;; |------------- DATA -------------|-- REG ---|-- OP ---| +;; If REG2 is specified, embed a code in the following format. +;; |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| +;; |-------- DATA -------|-- REG2 --|-- REG ---|-- OP ---| + +;; If REG is a CCL register symbol (e.g. r0, r1...), the register +;; number is embedded. If OP is one of unconditional jumps, DATA is +;; changed to an relative jump address. + +(defun ccl-embed-code (op reg data &optional reg2) + (if (and (> data 0) (get op 'jump-flag)) + ;; DATA is an absolute jump address. Make it relative to the + ;; next of jump code. + (setq data (- data (1+ ccl-current-ic)))) + (let ((code (logior (get op 'ccl-code) + (ash + (if (symbolp reg) (get reg 'ccl-register-number) reg) 5) + (if reg2 + (logior (ash (get reg2 'ccl-register-number) 8) + (ash data 11)) + (ash data 8))))) + (ccl-embed-data code))) + +;; extended ccl command format +;; |- 14-bit -|- 3-bit --|- 3-bit --|- 3-bit --|- 5-bit -| +;; |- EX-OP --|-- REG3 --|-- REG2 --|-- REG ---|-- OP ---| +(defun ccl-embed-extended-command (ex-op reg reg2 reg3) + (let ((data (logior (ash (get ex-op 'ccl-ex-code) 3) + (if (symbolp reg3) + (get reg3 'ccl-register-number) + 0)))) + (ccl-embed-code 'ex-cmd reg data reg2))) + +;; Just advance `ccl-current-ic' by INC. +(defun ccl-increment-ic (inc) + (setq ccl-current-ic (+ ccl-current-ic inc))) + +;; If non-nil, index of the start of the current loop. +(defvar ccl-loop-head nil) +;; If non-nil, list of absolute addresses of the breaking points of +;; the current loop. +(defvar ccl-breaks nil) + +;;;###autoload +(defun ccl-compile (ccl-program) + "Return a compiled code of CCL-PROGRAM as a vector of integer." + (if (or (null (consp ccl-program)) + (null (integerp (car ccl-program))) + (null (listp (car (cdr ccl-program))))) + (error "CCL: Invalid CCL program: %s" ccl-program)) + (if (null (vectorp ccl-program-vector)) + (setq ccl-program-vector (make-vector 8192 0))) + (setq ccl-loop-head nil ccl-breaks nil) + (setq ccl-current-ic 0) + + ;; The first element is the buffer magnification. + (ccl-embed-data (car ccl-program)) + + ;; The second element is the address of the start CCL code for + ;; processing end of input buffer (we call it eof-processor). We + ;; set it later. + (ccl-increment-ic 1) + + ;; Compile the main body of the CCL program. + (ccl-compile-1 (car (cdr ccl-program))) + + ;; Embed the address of eof-processor. + (ccl-embed-data ccl-current-ic 1) + + ;; Then compile eof-processor. + (if (nth 2 ccl-program) + (ccl-compile-1 (nth 2 ccl-program))) + + ;; At last, embed termination code. + (ccl-embed-code 'end 0 0) + + (let ((vec (make-vector ccl-current-ic 0)) + (i 0)) + (while (< i ccl-current-ic) + (aset vec i (aref ccl-program-vector i)) + (setq i (1+ i))) + vec)) + +;; Signal syntax error. +(defun ccl-syntax-error (cmd) + (error "CCL: Syntax error: %s" cmd)) + +;; Check if ARG is a valid CCL register. +(defun ccl-check-register (arg cmd) + (if (get arg 'ccl-register-number) + arg + (error "CCL: Invalid register %s in %s." arg cmd))) + +;; Check if ARG is a valid CCL command. +(defun ccl-check-compile-function (arg cmd) + (or (get arg 'ccl-compile-function) + (error "CCL: Invalid command: %s" cmd))) + +;; In the following code, most ccl-compile-XXXX functions return t if +;; they end with unconditional jump, else return nil. + +;; Compile CCL-BLOCK (see the syntax above). +(defun ccl-compile-1 (ccl-block) + (let (unconditional-jump + cmd) + (if (or (integer-or-char-p ccl-block) + (stringp ccl-block) + (and ccl-block (symbolp (car ccl-block)))) + ;; This block consists of single statement. + (setq ccl-block (list ccl-block))) + + ;; Now CCL-BLOCK is a list of statements. Compile them one by + ;; one. + (while ccl-block + (setq cmd (car ccl-block)) + (setq unconditional-jump + (cond ((integer-or-char-p cmd) + ;; SET statement for the register 0. + (ccl-compile-set (list 'r0 '= cmd))) + + ((stringp cmd) + ;; WRITE statement of string argument. + (ccl-compile-write-string cmd)) + + ((listp cmd) + ;; The other statements. + (cond ((eq (nth 1 cmd) '=) + ;; SET statement of the form `(REG = EXPRESSION)'. + (ccl-compile-set cmd)) + + ((and (symbolp (nth 1 cmd)) + (get (nth 1 cmd) 'ccl-self-arith-code)) + ;; SET statement with an assignment operation. + (ccl-compile-self-set cmd)) + + (t + (funcall (ccl-check-compile-function (car cmd) cmd) + cmd)))) + + (t + (ccl-syntax-error cmd)))) + (setq ccl-block (cdr ccl-block))) + unconditional-jump)) + +(defconst ccl-max-short-const (ash 1 19)) +(defconst ccl-min-short-const (ash -1 19)) + +;; Compile SET statement. +(defun ccl-compile-set (cmd) + (let ((rrr (ccl-check-register (car cmd) cmd)) + (right (nth 2 cmd))) + (cond ((listp right) + ;; CMD has the form `(RRR = (XXX OP YYY))'. + (ccl-compile-expression rrr right)) + + ((integer-or-char-p right) + ;; CMD has the form `(RRR = integer)'. + (if (and (<= right ccl-max-short-const) + (>= right ccl-min-short-const)) + (ccl-embed-code 'set-short-const rrr right) + (ccl-embed-code 'set-const rrr 0) + (ccl-embed-data right))) + + (t + ;; CMD has the form `(RRR = rrr [ array ])'. + (ccl-check-register right cmd) + (let ((ary (nth 3 cmd))) + (if (vectorp ary) + (let ((i 0) (len (length ary))) + (ccl-embed-code 'set-array rrr len right) + (while (< i len) + (ccl-embed-data (aref ary i)) + (setq i (1+ i)))) + (ccl-embed-code 'set-register rrr 0 right)))))) + nil) + +;; Compile SET statement with ASSIGNMENT_OPERATOR. +(defun ccl-compile-self-set (cmd) + (let ((rrr (ccl-check-register (car cmd) cmd)) + (right (nth 2 cmd))) + (if (listp right) + ;; CMD has the form `(RRR ASSIGN_OP (XXX OP YYY))', compile + ;; the right hand part as `(r7 = (XXX OP YYY))' (note: the + ;; register 7 can be used for storing temporary value). + (progn + (ccl-compile-expression 'r7 right) + (setq right 'r7))) + ;; Now CMD has the form `(RRR ASSIGN_OP ARG)'. Compile it as + ;; `(RRR = (RRR OP ARG))'. + (ccl-compile-expression + rrr + (list rrr (intern (substring (symbol-name (nth 1 cmd)) 0 -1)) right))) + nil) + +;; Compile SET statement of the form `(RRR = EXPR)'. +(defun ccl-compile-expression (rrr expr) + (let ((left (car expr)) + (op (get (nth 1 expr) 'ccl-arith-code)) + (right (nth 2 expr))) + (if (listp left) + (progn + ;; EXPR has the form `((EXPR2 OP2 ARG) OP RIGHT)'. Compile + ;; the first term as `(r7 = (EXPR2 OP2 ARG)).' + (ccl-compile-expression 'r7 left) + (setq left 'r7))) + + ;; Now EXPR has the form (LEFT OP RIGHT). + (if (and (eq rrr left) + (< op (length ccl-assign-arith-table))) + ;; Compile this SET statement as `(RRR OP= RIGHT)'. + (if (integer-or-char-p right) + (progn + (ccl-embed-code 'set-assign-expr-const rrr (ash op 3) 'r0) + (ccl-embed-data right)) + (ccl-check-register right expr) + (ccl-embed-code 'set-assign-expr-register rrr (ash op 3) right)) + + ;; Compile this SET statement as `(RRR = (LEFT OP RIGHT))'. + (if (integer-or-char-p right) + (progn + (ccl-embed-code 'set-expr-const rrr (ash op 3) left) + (ccl-embed-data right)) + (ccl-check-register right expr) + (ccl-embed-code 'set-expr-register + rrr + (logior (ash op 3) (get right 'ccl-register-number)) + left))))) + +;; Compile WRITE statement with string argument. +(defun ccl-compile-write-string (str) + (setq str (encode-coding-string str 'binary)) + (let ((len (length str))) + (ccl-embed-code 'write-const-string 1 len) + (ccl-embed-string len str)) + nil) + +;; Compile IF statement of the form `(if CONDITION TRUE-PART FALSE-PART)'. +;; If READ-FLAG is non-nil, this statement has the form +;; `(read-if (REG OPERATOR ARG) TRUE-PART FALSE-PART)'. +(defun ccl-compile-if (cmd &optional read-flag) + (if (and (/= (length cmd) 3) (/= (length cmd) 4)) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((condition (nth 1 cmd)) + (true-cmds (nth 2 cmd)) + (false-cmds (nth 3 cmd)) + jump-cond-address) + (if (and (listp condition) + (listp (car condition))) + ;; If CONDITION is a nested expression, the inner expression + ;; should be compiled at first as SET statement, i.e.: + ;; `(if ((X OP2 Y) OP Z) ...)' is compiled into two statements: + ;; `(r7 = (X OP2 Y)) (if (r7 OP Z) ...)'. + (progn + (ccl-compile-expression 'r7 (car condition)) + (setq condition (cons 'r7 (cdr condition))) + (setq cmd (cons (car cmd) + (cons condition (cdr (cdr cmd))))))) + + (setq jump-cond-address ccl-current-ic) + ;; Compile CONDITION. + (if (symbolp condition) + ;; CONDITION is a register. + (progn + (ccl-check-register condition cmd) + (ccl-embed-code 'jump-cond condition 0)) + ;; CONDITION is a simple expression of the form (RRR OP ARG). + (let ((rrr (car condition)) + (op (get (nth 1 condition) 'ccl-arith-code)) + (arg (nth 2 condition))) + (ccl-check-register rrr cmd) + (if (integer-or-char-p arg) + (progn + (ccl-embed-code (if read-flag 'read-jump-cond-expr-const + 'jump-cond-expr-const) + rrr 0) + (ccl-embed-data op) + (ccl-embed-data arg)) + (ccl-check-register arg cmd) + (ccl-embed-code (if read-flag 'read-jump-cond-expr-register + 'jump-cond-expr-register) + rrr 0) + (ccl-embed-data op) + (ccl-embed-data (get arg 'ccl-register-number))))) + + ;; Compile TRUE-PART. + (let ((unconditional-jump (ccl-compile-1 true-cmds))) + (if (null false-cmds) + ;; This is the place to jump to if condition is false. + (progn + (ccl-embed-current-address jump-cond-address) + (setq unconditional-jump nil)) + (let (end-true-part-address) + (if (not unconditional-jump) + (progn + ;; If TRUE-PART does not end with unconditional jump, we + ;; have to jump to the end of FALSE-PART from here. + (setq end-true-part-address ccl-current-ic) + (ccl-embed-code 'jump 0 0))) + ;; This is the place to jump to if CONDITION is false. + (ccl-embed-current-address jump-cond-address) + ;; Compile FALSE-PART. + (setq unconditional-jump + (and (ccl-compile-1 false-cmds) unconditional-jump)) + (if end-true-part-address + ;; This is the place to jump to after the end of TRUE-PART. + (ccl-embed-current-address end-true-part-address)))) + unconditional-jump))) + +;; Compile BRANCH statement. +(defun ccl-compile-branch (cmd) + (if (< (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (ccl-compile-branch-blocks 'branch + (ccl-compile-branch-expression (nth 1 cmd) cmd) + (cdr (cdr cmd)))) + +;; Compile READ statement of the form `(read-branch EXPR BLOCK0 BLOCK1 ...)'. +(defun ccl-compile-read-branch (cmd) + (if (< (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (ccl-compile-branch-blocks 'read-branch + (ccl-compile-branch-expression (nth 1 cmd) cmd) + (cdr (cdr cmd)))) + +;; Compile EXPRESSION part of BRANCH statement and return register +;; which holds a value of the expression. +(defun ccl-compile-branch-expression (expr cmd) + (if (listp expr) + ;; EXPR has the form `(EXPR2 OP ARG)'. Compile it as SET + ;; statement of the form `(r7 = (EXPR2 OP ARG))'. + (progn + (ccl-compile-expression 'r7 expr) + 'r7) + (ccl-check-register expr cmd))) + +;; Compile BLOCKs of BRANCH statement. CODE is 'branch or 'read-branch. +;; REG is a register which holds a value of EXPRESSION part. BLOCKs +;; is a list of CCL-BLOCKs. +(defun ccl-compile-branch-blocks (code rrr blocks) + (let ((branches (length blocks)) + branch-idx + jump-table-head-address + empty-block-indexes + block-tail-addresses + block-unconditional-jump) + (ccl-embed-code code rrr branches) + (setq jump-table-head-address ccl-current-ic) + ;; The size of jump table is the number of blocks plus 1 (for the + ;; case RRR is out of range). + (ccl-increment-ic (1+ branches)) + (setq empty-block-indexes (list branches)) + ;; Compile each block. + (setq branch-idx 0) + (while blocks + (if (null (car blocks)) + ;; This block is empty. + (setq empty-block-indexes (cons branch-idx empty-block-indexes) + block-unconditional-jump t) + ;; This block is not empty. + (ccl-embed-data (- ccl-current-ic jump-table-head-address) + (+ jump-table-head-address branch-idx)) + (setq block-unconditional-jump (ccl-compile-1 (car blocks))) + (if (not block-unconditional-jump) + (progn + ;; Jump address of the end of branches are embedded later. + ;; For the moment, just remember where to embed them. + (setq block-tail-addresses + (cons ccl-current-ic block-tail-addresses)) + (ccl-embed-code 'jump 0 0)))) + (setq branch-idx (1+ branch-idx)) + (setq blocks (cdr blocks))) + (if (not block-unconditional-jump) + ;; We don't need jump code at the end of the last block. + (setq block-tail-addresses (cdr block-tail-addresses) + ccl-current-ic (1- ccl-current-ic))) + ;; Embed jump address at the tailing jump commands of blocks. + (while block-tail-addresses + (ccl-embed-current-address (car block-tail-addresses)) + (setq block-tail-addresses (cdr block-tail-addresses))) + ;; For empty blocks, make entries in the jump table point directly here. + (while empty-block-indexes + (ccl-embed-data (- ccl-current-ic jump-table-head-address) + (+ jump-table-head-address (car empty-block-indexes))) + (setq empty-block-indexes (cdr empty-block-indexes)))) + ;; Branch command ends by unconditional jump if RRR is out of range. + nil) + +;; Compile LOOP statement. +(defun ccl-compile-loop (cmd) + (if (< (length cmd) 2) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let* ((ccl-loop-head ccl-current-ic) + (ccl-breaks nil) + unconditional-jump) + (setq cmd (cdr cmd)) + (if cmd + (progn + (setq unconditional-jump t) + (while cmd + (setq unconditional-jump + (and (ccl-compile-1 (car cmd)) unconditional-jump)) + (setq cmd (cdr cmd))) + (if (not ccl-breaks) + unconditional-jump + ;; Embed jump address for break statements encountered in + ;; this loop. + (while ccl-breaks + (ccl-embed-current-address (car ccl-breaks)) + (setq ccl-breaks (cdr ccl-breaks)))) + nil)))) + +;; Compile BREAK statement. +(defun ccl-compile-break (cmd) + (if (/= (length cmd) 1) + (error "CCL: Invalid number of arguments: %s" cmd)) + (if (null ccl-loop-head) + (error "CCL: No outer loop: %s" cmd)) + (setq ccl-breaks (cons ccl-current-ic ccl-breaks)) + (ccl-embed-code 'jump 0 0) + t) + +;; Compile REPEAT statement. +(defun ccl-compile-repeat (cmd) + (if (/= (length cmd) 1) + (error "CCL: Invalid number of arguments: %s" cmd)) + (if (null ccl-loop-head) + (error "CCL: No outer loop: %s" cmd)) + (ccl-embed-code 'jump 0 ccl-loop-head) + t) + +;; Compile WRITE-REPEAT statement. +(defun ccl-compile-write-repeat (cmd) + (if (/= (length cmd) 2) + (error "CCL: Invalid number of arguments: %s" cmd)) + (if (null ccl-loop-head) + (error "CCL: No outer loop: %s" cmd)) + (let ((arg (nth 1 cmd))) + (cond ((integer-or-char-p arg) + (ccl-embed-code 'write-const-jump 0 ccl-loop-head) + (ccl-embed-data arg)) + ((stringp arg) + (setq arg (encode-coding-string arg 'binary)) + (let ((len (length arg))) + (ccl-embed-code 'write-string-jump 0 ccl-loop-head) + (ccl-embed-data len) + (ccl-embed-string len arg))) + (t + (ccl-check-register arg cmd) + (ccl-embed-code 'write-register-jump arg ccl-loop-head)))) + t) + +;; Compile WRITE-READ-REPEAT statement. +(defun ccl-compile-write-read-repeat (cmd) + (if (or (< (length cmd) 2) (> (length cmd) 3)) + (error "CCL: Invalid number of arguments: %s" cmd)) + (if (null ccl-loop-head) + (error "CCL: No outer loop: %s" cmd)) + (let ((rrr (ccl-check-register (nth 1 cmd) cmd)) + (arg (nth 2 cmd))) + (cond ((null arg) + (ccl-embed-code 'write-register-read-jump rrr ccl-loop-head)) + ((integer-or-char-p arg) + (ccl-embed-code 'write-const-read-jump rrr arg ccl-loop-head)) + ((vectorp arg) + (let ((len (length arg)) + (i 0)) + (ccl-embed-code 'write-array-read-jump rrr ccl-loop-head) + (ccl-embed-data len) + (while (< i len) + (ccl-embed-data (aref arg i)) + (setq i (1+ i))))) + (t + (error "CCL: Invalid argument %s: %s" arg cmd))) + (ccl-embed-code 'read-jump rrr ccl-loop-head)) + t) + +;; Compile READ statement. +(defun ccl-compile-read (cmd) + (if (< (length cmd) 2) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let* ((args (cdr cmd)) + (i (1- (length args)))) + (while args + (let ((rrr (ccl-check-register (car args) cmd))) + (ccl-embed-code 'read-register rrr i) + (setq args (cdr args) i (1- i))))) + nil) + +;; Compile READ-IF statement. +(defun ccl-compile-read-if (cmd) + (ccl-compile-if cmd 'read)) + +;; Compile WRITE statement. +(defun ccl-compile-write (cmd) + (if (< (length cmd) 2) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((rrr (nth 1 cmd))) + (cond ((integer-or-char-p rrr) + (ccl-embed-code 'write-const-string 0 rrr)) + ((stringp rrr) + (ccl-compile-write-string rrr)) + ((and (symbolp rrr) (vectorp (nth 2 cmd))) + (ccl-check-register rrr cmd) + ;; CMD has the form `(write REG ARRAY)'. + (let* ((arg (nth 2 cmd)) + (len (length arg)) + (i 0)) + (ccl-embed-code 'write-array rrr len) + (while (< i len) + (if (not (integer-or-char-p (aref arg i))) + (error "CCL: Invalid argument %s: %s" arg cmd)) + (ccl-embed-data (aref arg i)) + (setq i (1+ i))))) + + ((symbolp rrr) + ;; CMD has the form `(write REG ...)'. + (let* ((args (cdr cmd)) + (i (1- (length args)))) + (while args + (setq rrr (ccl-check-register (car args) cmd)) + (ccl-embed-code 'write-register rrr i) + (setq args (cdr args) i (1- i))))) + + ((listp rrr) + ;; CMD has the form `(write (LEFT OP RIGHT))'. + (let ((left (car rrr)) + (op (get (nth 1 rrr) 'ccl-arith-code)) + (right (nth 2 rrr))) + (if (listp left) + (progn + ;; RRR has the form `((EXPR OP2 ARG) OP RIGHT)'. + ;; Compile the first term as `(r7 = (EXPR OP2 ARG))'. + (ccl-compile-expression 'r7 left) + (setq left 'r7))) + ;; Now RRR has the form `(ARG OP RIGHT)'. + (if (integer-or-char-p right) + (progn + (ccl-embed-code 'write-expr-const 0 (ash op 3) left) + (ccl-embed-data right)) + (ccl-check-register right rrr) + (ccl-embed-code 'write-expr-register 0 + (logior (ash op 3) + (get right 'ccl-register-number)))))) + + (t + (error "CCL: Invalid argument: %s" cmd)))) + nil) + +;; Compile CALL statement. +(defun ccl-compile-call (cmd) + (if (/= (length cmd) 2) + (error "CCL: Invalid number of arguments: %s" cmd)) + (if (not (symbolp (nth 1 cmd))) + (error "CCL: Subroutine should be a symbol: %s" cmd)) + (ccl-embed-code 'call 1 0) + (ccl-embed-symbol (nth 1 cmd) 'ccl-program-idx) + nil) + +;; Compile END statement. +(defun ccl-compile-end (cmd) + (if (/= (length cmd) 1) + (error "CCL: Invalid number of arguments: %s" cmd)) + (ccl-embed-code 'end 0 0) + t) + +;; Compile read-multibyte-character +(defun ccl-compile-read-multibyte-character (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'read-multibyte-character rrr RRR 0)) + nil) + +;; Compile write-multibyte-character +(defun ccl-compile-write-multibyte-character (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'write-multibyte-character rrr RRR 0)) + nil) + +;; Compile translate-character +(defun ccl-compile-translate-character (cmd) + (if (/= (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((Rrr (nth 1 cmd)) + (RRR (nth 2 cmd)) + (rrr (nth 3 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (cond ((and (symbolp Rrr) (not (get Rrr 'ccl-register-number))) + (ccl-embed-extended-command 'translate-character-const-tbl + rrr RRR 0) + (ccl-embed-symbol Rrr 'translation-table-id)) + (t + (ccl-check-register Rrr cmd) + (ccl-embed-extended-command 'translate-character rrr RRR Rrr)))) + nil) + +;; Compile mule-to-unicode +(defun ccl-compile-mule-to-unicode (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd))) + (ccl-check-register RRR cmd) + (ccl-check-register rrr cmd) + (ccl-embed-extended-command 'mule-to-unicode RRR rrr 0)) + nil) + +;; Given a Unicode code point in register rrr, write the charset ID of the +;; corresponding character in RRR, and the Mule-CCL form of its code in rrr. +(defun ccl-compile-unicode-to-mule (cmd) + (if (/= (length cmd) 3) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((rrr (nth 1 cmd)) + (RRR (nth 2 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'unicode-to-mule rrr RRR 0)) + nil) + +;; Compile lookup-integer +(defun ccl-compile-lookup-integer (cmd) + (if (/= (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((Rrr (nth 1 cmd)) + (RRR (nth 2 cmd)) + (rrr (nth 3 cmd))) + (ccl-check-register RRR cmd) + (ccl-check-register rrr cmd) + (cond ((and (symbolp Rrr) (not (get Rrr 'ccl-register-number))) + (ccl-embed-extended-command 'lookup-int-const-tbl + rrr RRR 0) + (ccl-embed-symbol Rrr 'translation-hash-table-id)) + (t + (error "CCL: non-constant table: %s" cmd) + ;; not implemented: + (ccl-check-register Rrr cmd) + (ccl-embed-extended-command 'lookup-int rrr RRR 0)))) + nil) + +;; Compile lookup-character +(defun ccl-compile-lookup-character (cmd) + (if (/= (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((Rrr (nth 1 cmd)) + (RRR (nth 2 cmd)) + (rrr (nth 3 cmd))) + (ccl-check-register RRR cmd) + (ccl-check-register rrr cmd) + (cond ((and (symbolp Rrr) (not (get Rrr 'ccl-register-number))) + (ccl-embed-extended-command 'lookup-char-const-tbl + rrr RRR 0) + (ccl-embed-symbol Rrr 'translation-hash-table-id)) + (t + (error "CCL: non-constant table: %s" cmd) + ;; not implemented: + (ccl-check-register Rrr cmd) + (ccl-embed-extended-command 'lookup-char rrr RRR 0)))) + nil) + +(defun ccl-compile-iterate-multiple-map (cmd) + (ccl-compile-multiple-map-function 'iterate-multiple-map cmd) + nil) + +(defun ccl-compile-map-multiple (cmd) + (if (/= (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let (func arg) + (setq func + (lambda (arg mp) + (let ((len 0) result add) + (while arg + (if (consp (car arg)) + (setq add (funcall func (car arg) t) + result (append result add) + add (+ (- (car add)) 1)) + (setq result + (append result + (list (car arg))) + add 1)) + (setq arg (cdr arg) + len (+ len add))) + (if mp + (cons (- len) result) + result)))) + (setq arg (append (list (nth 0 cmd) (nth 1 cmd) (nth 2 cmd)) + (funcall func (nth 3 cmd) nil))) + (ccl-compile-multiple-map-function 'map-multiple arg)) + nil) + +(defun ccl-compile-map-single (cmd) + (if (/= (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd)) + (map (nth 3 cmd))) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command 'map-single rrr RRR 0) + (cond ((symbolp map) + (if (get map 'code-conversion-map) + (ccl-embed-symbol map 'code-conversion-map-id) + (error "CCL: Invalid map: %s" map))) + (t + (error "CCL: Invalid type of arguments: %s" cmd)))) + nil) + +(defun ccl-compile-multiple-map-function (command cmd) + (if (< (length cmd) 4) + (error "CCL: Invalid number of arguments: %s" cmd)) + (let ((RRR (nth 1 cmd)) + (rrr (nth 2 cmd)) + (args (nthcdr 3 cmd)) + map) + (ccl-check-register rrr cmd) + (ccl-check-register RRR cmd) + (ccl-embed-extended-command command rrr RRR 0) + (ccl-embed-data (length args)) + (while args + (setq map (car args)) + (cond ((symbolp map) + (if (get map 'code-conversion-map) + (ccl-embed-symbol map 'code-conversion-map-id) + (error "CCL: Invalid map: %s" map))) + ((numberp map) + (ccl-embed-data map)) + (t + (error "CCL: Invalid type of arguments: %s" cmd))) + (setq args (cdr args))))) + + +;;; CCL dump staffs + +;; To avoid byte-compiler warning. +(defvar ccl-code) + +;;;###autoload +(defun ccl-dump (ccl-code) + "Disassemble compiled CCL-CODE." + (let ((len (length ccl-code)) + (buffer-mag (aref ccl-code 0))) + (cond ((= buffer-mag 0) + (insert "Don't output anything.\n")) + ((= buffer-mag 1) + (insert "Out-buffer must be as large as in-buffer.\n")) + (t + (insert + (format "Out-buffer must be %d times bigger than in-buffer.\n" + buffer-mag)))) + (insert "Main-body:\n") + (setq ccl-current-ic 2) + (if (> (aref ccl-code 1) 0) + (progn + (while (< ccl-current-ic (aref ccl-code 1)) + (ccl-dump-1)) + (insert "At EOF:\n"))) + (while (< ccl-current-ic len) + (ccl-dump-1)) + )) + +;; Return a CCL code in `ccl-code' at `ccl-current-ic'. +(defun ccl-get-next-code () + (prog1 + (aref ccl-code ccl-current-ic) + (setq ccl-current-ic (1+ ccl-current-ic)))) + +(defun ccl-dump-1 () + (let* ((code (ccl-get-next-code)) + (cmd (aref ccl-code-table (logand code 31))) + (rrr (ash (logand code 255) -5)) + (cc (ash code -8))) + (insert (format "%5d:[%s] " (1- ccl-current-ic) cmd)) + (funcall (get cmd 'ccl-dump-function) rrr cc))) + +(defun ccl-dump-set-register (rrr cc) + (insert (format "r%d = r%d\n" rrr cc))) + +(defun ccl-dump-set-short-const (rrr cc) + (insert (format "r%d = %d\n" rrr cc))) + +(defun ccl-dump-set-const (rrr ignore) + (insert (format "r%d = %d\n" rrr (ccl-get-next-code)))) + +(defun ccl-dump-set-array (rrr cc) + (let ((rrr2 (logand cc 7)) + (len (ash cc -3)) + (i 0)) + (insert (format "r%d = array[r%d] of length %d\n\t" + rrr rrr2 len)) + (while (< i len) + (insert (format "%d " (ccl-get-next-code))) + (setq i (1+ i))) + (insert "\n"))) + +(defun ccl-dump-jump (ignore cc &optional address) + (insert (format "jump to %d(" (+ (or address ccl-current-ic) cc))) + (if (>= cc 0) + (insert "+")) + (insert (format "%d)\n" (1+ cc)))) + +(defun ccl-dump-jump-cond (rrr cc) + (insert (format "if (r%d == 0), " rrr)) + (ccl-dump-jump nil cc)) + +(defun ccl-dump-write-register-jump (rrr cc) + (insert (format "write r%d, " rrr)) + (ccl-dump-jump nil cc)) + +(defun ccl-dump-write-register-read-jump (rrr cc) + (insert (format "write r%d, read r%d, " rrr rrr)) + (ccl-dump-jump nil cc) + (ccl-get-next-code) ; Skip dummy READ-JUMP + ) + +(defun ccl-extract-arith-op (cc) + (aref ccl-arith-table (ash cc -6))) + +(defun ccl-dump-write-expr-const (ignore cc) + (insert (format "write (r%d %s %d)\n" + (logand cc 7) + (ccl-extract-arith-op cc) + (ccl-get-next-code)))) + +(defun ccl-dump-write-expr-register (ignore cc) + (insert (format "write (r%d %s r%d)\n" + (logand cc 7) + (ccl-extract-arith-op cc) + (logand (ash cc -3) 7)))) + +(defun ccl-dump-insert-char (cc) + (cond ((= cc ?\t) (insert " \"^I\"")) + ((= cc ?\n) (insert " \"^J\"")) + (t (insert (format " \"%c\"" cc))))) + +(defun ccl-dump-write-const-jump (ignore cc) + (let ((address ccl-current-ic)) + (insert "write char") + (ccl-dump-insert-char (ccl-get-next-code)) + (insert ", ") + (ccl-dump-jump nil cc address))) + +(defun ccl-dump-write-const-read-jump (rrr cc) + (let ((address ccl-current-ic)) + (insert "write char") + (ccl-dump-insert-char (ccl-get-next-code)) + (insert (format ", read r%d, " rrr)) + (ccl-dump-jump cc address) + (ccl-get-next-code) ; Skip dummy READ-JUMP + )) + +(defun ccl-dump-write-string-jump (ignore cc) + (let ((address ccl-current-ic) + (len (ccl-get-next-code)) + (i 0)) + (insert "write \"") + (while (< i len) + (let ((code (ccl-get-next-code))) + (insert (ash code -16)) + (if (< (1+ i) len) (insert (logand (ash code -8) 255))) + (if (< (+ i 2) len) (insert (logand code 255)))) + (setq i (+ i 3))) + (insert "\", ") + (ccl-dump-jump nil cc address))) + +(defun ccl-dump-write-array-read-jump (rrr cc) + (let ((address ccl-current-ic) + (len (ccl-get-next-code)) + (i 0)) + (insert (format "write array[r%d] of length %d,\n\t" rrr len)) + (while (< i len) + (ccl-dump-insert-char (ccl-get-next-code)) + (setq i (1+ i))) + (insert (format "\n\tthen read r%d, " rrr)) + (ccl-dump-jump nil cc address) + (ccl-get-next-code) ; Skip dummy READ-JUMP. + )) + +(defun ccl-dump-read-jump (rrr cc) + (insert (format "read r%d, " rrr)) + (ccl-dump-jump nil cc)) + +(defun ccl-dump-branch (rrr len) + (let ((jump-table-head ccl-current-ic) + (i 0)) + (insert (format "jump to array[r%d] of length %d\n\t" rrr len)) + (while (<= i len) + (insert (format "%d " (+ jump-table-head (ccl-get-next-code)))) + (setq i (1+ i))) + (insert "\n"))) + +(defun ccl-dump-read-register (rrr cc) + (insert (format "read r%d (%d remaining)\n" rrr cc))) + +(defun ccl-dump-read-branch (rrr len) + (insert (format "read r%d, " rrr)) + (ccl-dump-branch rrr len)) + +(defun ccl-dump-write-register (rrr cc) + (insert (format "write r%d (%d remaining)\n" rrr cc))) + +(defun ccl-dump-call (ignore cc) + (insert (format "call subroutine #%d\n" cc))) + +(defun ccl-dump-write-const-string (rrr cc) + (if (= rrr 0) + (progn + (insert "write char") + (ccl-dump-insert-char cc) + (newline)) + (let ((len cc) + (i 0)) + (insert "write \"") + (while (< i len) + (let ((code (ccl-get-next-code))) + (insert (format "%c" (lsh code -16))) + (if (< (1+ i) len) + (insert (format "%c" (logand (lsh code -8) 255)))) + (if (< (+ i 2) len) + (insert (format "%c" (logand code 255)))) + (setq i (+ i 3)))) + (insert "\"\n")))) + +(defun ccl-dump-write-array (rrr cc) + (let ((i 0)) + (insert (format "write array[r%d] of length %d\n\t" rrr cc)) + (while (< i cc) + (ccl-dump-insert-char (ccl-get-next-code)) + (setq i (1+ i))) + (insert "\n"))) + +(defun ccl-dump-end (&rest ignore) + (insert "end\n")) + +(defun ccl-dump-set-assign-expr-const (rrr cc) + (insert (format "r%d %s= %d\n" + rrr + (ccl-extract-arith-op cc) + (ccl-get-next-code)))) + +(defun ccl-dump-set-assign-expr-register (rrr cc) + (insert (format "r%d %s= r%d\n" + rrr + (ccl-extract-arith-op cc) + (logand cc 7)))) + +(defun ccl-dump-set-expr-const (rrr cc) + (insert (format "r%d = r%d %s %d\n" + rrr + (logand cc 7) + (ccl-extract-arith-op cc) + (ccl-get-next-code)))) + +(defun ccl-dump-set-expr-register (rrr cc) + (insert (format "r%d = r%d %s r%d\n" + rrr + (logand cc 7) + (ccl-extract-arith-op cc) + (logand (ash cc -3) 7)))) + +(defun ccl-dump-jump-cond-expr-const (rrr cc) + (let ((address ccl-current-ic)) + (insert (format "if !(r%d %s %d), " + rrr + (aref ccl-arith-table (ccl-get-next-code)) + (ccl-get-next-code))) + (ccl-dump-jump nil cc address))) + +(defun ccl-dump-jump-cond-expr-register (rrr cc) + (let ((address ccl-current-ic)) + (insert (format "if !(r%d %s r%d), " + rrr + (aref ccl-arith-table (ccl-get-next-code)) + (ccl-get-next-code))) + (ccl-dump-jump nil cc address))) + +(defun ccl-dump-read-jump-cond-expr-const (rrr cc) + (insert (format "read r%d, " rrr)) + (ccl-dump-jump-cond-expr-const rrr cc)) + +(defun ccl-dump-read-jump-cond-expr-register (rrr cc) + (insert (format "read r%d, " rrr)) + (ccl-dump-jump-cond-expr-register rrr cc)) + +(defun ccl-dump-binary (ccl-code) + (let ((len (length ccl-code)) + (i 2)) + (while (< i len) + (let ((code (aref ccl-code i)) + (j 27)) + (while (>= j 0) + (insert (if (= (logand code (ash 1 j)) 0) ?0 ?1)) + (setq j (1- j))) + (setq code (logand code 31)) + (if (< code (length ccl-code-table)) + (insert (format ":%s" (aref ccl-code-table code)))) + (insert "\n")) + (setq i (1+ i))))) + +(defun ccl-dump-ex-cmd (rrr cc) + (let* ((RRR (logand cc #x7)) + (Rrr (logand (ash cc -3) #x7)) + (ex-op (aref ccl-extended-code-table (logand (ash cc -6) #x3fff)))) + (insert (format "<%s> " ex-op)) + (funcall (get ex-op 'ccl-dump-function) rrr RRR Rrr))) + +(defun ccl-dump-read-multibyte-character (rrr RRR Rrr) + (insert (format "read-multibyte-character r%d r%d\n" RRR rrr))) + +(defun ccl-dump-write-multibyte-character (rrr RRR Rrr) + (insert (format "write-multibyte-character r%d r%d\n" RRR rrr))) + +(defun ccl-dump-translate-character (rrr RRR Rrr) + (insert (format "translation table(r%d) r%d r%d\n" Rrr RRR rrr))) + +(defun ccl-dump-translate-character-const-tbl (rrr RRR Rrr) + (let ((tbl (ccl-get-next-code))) + (insert (format "translation table(%S) r%d r%d\n" tbl RRR rrr)))) + +(defun ccl-dump-lookup-int-const-tbl (rrr RRR Rrr) + (let ((tbl (ccl-get-next-code))) + (insert (format "hash table(%S) r%d r%d\n" tbl RRR rrr)))) + +(defun ccl-dump-lookup-char-const-tbl (rrr RRR Rrr) + (let ((tbl (ccl-get-next-code))) + (insert (format "hash table(%S) r%d r%d\n" tbl RRR rrr)))) + +(defun ccl-dump-mule-to-unicode (rrr RRR Rrr) + (insert (format "change chars in r%d and r%d to unicode\n" RRR rrr))) + +(defun ccl-dump-unicode-to-mule (rrr RRR Rrr) + (insert (format "converter UCS code %d to a Mule char\n" rrr))) + +(defun ccl-dump-iterate-multiple-map (rrr RRR Rrr) + (let ((notbl (ccl-get-next-code)) + (i 0) id) + (insert (format "iterate-multiple-map r%d r%d\n" RRR rrr)) + (insert (format "\tnumber of maps is %d .\n\t [" notbl)) + (while (< i notbl) + (setq id (ccl-get-next-code)) + (insert (format "%S" id)) + (setq i (1+ i))) + (insert "]\n"))) + +(defun ccl-dump-map-multiple (rrr RRR Rrr) + (let ((notbl (ccl-get-next-code)) + (i 0) id) + (insert (format "map-multiple r%d r%d\n" RRR rrr)) + (insert (format "\tnumber of maps and separators is %d\n\t [" notbl)) + (while (< i notbl) + (setq id (ccl-get-next-code)) + (if (= id -1) + (insert "]\n\t [") + (insert (format "%S " id))) + (setq i (1+ i))) + (insert "]\n"))) + +(defun ccl-dump-map-single (rrr RRR Rrr) + (let ((id (ccl-get-next-code))) + (insert (format "map-single r%d r%d map(%S)\n" RRR rrr id)))) + + +;; CCL emulation staffs + +;; Not yet implemented. + +;; Auto-loaded functions. + +;;;###autoload +(defmacro declare-ccl-program (name &optional vector) + "Declare NAME as a name of CCL program. + +This macro exists for backward compatibility. In the old version of +Emacs, to compile a CCL program which calls another CCL program not +yet defined, it must be declared as a CCL program in advance. But, +now CCL program names are resolved not at compile time but before +execution. + +Optional arg VECTOR is a compiled CCL code of the CCL program." + `(put ',name 'ccl-program-idx (register-ccl-program ',name ,vector))) + +;;;###autoload +(defmacro define-ccl-program (name ccl-program &optional doc) + "Set NAME to be the compiled CCL code of CCL-PROGRAM. + +CCL-PROGRAM has this form: + (BUFFER_MAGNIFICATION + CCL_MAIN_CODE + [ CCL_EOF_CODE ]) + +BUFFER_MAGNIFICATION is an integer value specifying the approximate +output buffer magnification size compared with the bytes of input data +text. If the value is zero, the CCL program can't execute `read' and +`write' commands. + +CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE is +executed first. If there are no more input data when a `read' command is +executed in CCL_MAIN_CODE, CCL_EOF_CODE is executed. If CCL_MAIN_CODE is +terminated, CCL_EOF_CODE is not executed. + +Here's the syntax of CCL program code in BNF notation. The lines starting +with two semicolons (and optional leading spaces) describe the semantics. + +CCL_MAIN_CODE := CCL_BLOCK + +CCL_EOF_CODE := CCL_BLOCK + +CCL_BLOCK := STATEMENT | (STATEMENT [STATEMENT ...]) + +STATEMENT := + SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE | CALL + | TRANSLATE | MAP | LOOKUP | END + +SET := (REG = EXPRESSION) + | (REG ASSIGNMENT_OPERATOR EXPRESSION) + ;; The following form is the same as (r0 = INT-OR-CHAR). + | INT-OR-CHAR + +EXPRESSION := ARG | (EXPRESSION OPERATOR ARG) + +;; Evaluate EXPRESSION. If the result is nonzero, execute +;; CCL_BLOCK_0. Otherwise, execute CCL_BLOCK_1. +IF := (if EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1]) + +;; Evaluate EXPRESSION. Provided that the result is N, execute +;; CCL_BLOCK_N. +BRANCH := (branch EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + +;; Execute STATEMENTs until (break) or (end) is executed. +LOOP := (loop STATEMENT [STATEMENT ...]) + +;; Terminate the innermost loop. +BREAK := (break) + +REPEAT := + ;; Jump to the head of the innermost loop. + (repeat) + ;; Same as: ((write [REG | INT-OR-CHAR | string]) + ;; (repeat)) + | (write-repeat [REG | INT-OR-CHAR | string]) + ;; Same as: ((write REG [ARRAY]) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG [ARRAY]) + ;; Same as: ((write INT-OR-CHAR) + ;; (read REG) + ;; (repeat)) + | (write-read-repeat REG INT-OR-CHAR) + +READ := ;; Set REG_0 to a byte read from the input text, set REG_1 + ;; to the next byte read, and so on. Note that \"byte\" here means + ;; \"some octet from XEmacs' internal representation\", which may + ;; not be that useful to you when non-ASCII characters are involved. + ;; + ;; Yes, this is exactly the opposite of what (write ...) does. + (read REG_0 [REG_1 ...]) + ;; Same as: ((read REG) + ;; (if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1)) + | (read-if (REG OPERATOR ARG) CCL_BLOCK_0 [CCL_BLOCK_1]) + ;; Same as: ((read REG) + ;; (branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...])) + | (read-branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...]) + ;; Read a character from the input text, splitting it into its + ;; multibyte representation. Set REG_0 to the charset ID of the + ;; character, and set REG_1 to the code point of the character. If + ;; the dimension of charset is two, set REG_1 to ((CODE0 << 7) | + ;; CODE1), where CODE0 is the first code point and CODE1 is the + ;; second code point. + | (read-multibyte-character REG_0 REG_1) + +WRITE := + ;; Write REG_0, REG_1, ... to the output buffer. If REG_N is + ;; a multibyte character, write the corresponding multibyte + ;; representation. + (write REG_0 [REG_1 ...]) + ;; Same as: ((r7 = EXPRESSION) + ;; (write r7)) + | (write EXPRESSION) + ;; Write the value of `INT-OR-CHAR' to the output buffer. If it + ;; is a multibyte character, write the corresponding multibyte + ;; representation. + | (write INT-OR-CHAR) + ;; Write the byte sequence of `string' as is to the output + ;; buffer. It is encoded by binary coding system, thus, + ;; by this operation, you cannot write multibyte string + ;; as it is. + | (write string) + ;; Same as: (write string) + | string + ;; Provided that the value of REG is N, write Nth element of + ;; ARRAY to the output buffer. If it is a multibyte + ;; character, write the corresponding multibyte + ;; representation. + | (write REG ARRAY) + ;; Write a multibyte representation of a character whose + ;; charset ID is REG_0 and code point is REG_1. If the + ;; dimension of the charset is two, REG_1 should be ((CODE0 << + ;; 7) | CODE1), where CODE0 is the first code point and CODE1 + ;; is the second code point of the character. + | (write-multibyte-character REG_0 REG_1) + +;; Call CCL program whose name is ccl-program-name. +CALL := (call ccl-program-name) + +TRANSLATE := ;; Not implemented under XEmacs, except mule-to-unicode and + ;; unicode-to-mule. + (translate-character REG(table) REG(charset) REG(codepoint)) + | (translate-character SYMBOL REG(charset) REG(codepoint)) + | (mule-to-unicode REG(charset) REG(codepoint)) + | (unicode-to-mule REG(unicode,code) REG(CHARSET)) + +LOOKUP := + (lookup-character SYMBOL REG(charset) REG(codepoint)) + | (lookup-integer SYMBOL REG(integer)) + ;; SYMBOL refers to a table defined by `define-hash-translation-table'. + +MAP := + (iterate-multiple-map REG REG MAP-IDs) + | (map-multiple REG REG (MAP-SET)) + | (map-single REG REG MAP-ID) +MAP-IDs := MAP-ID ... +MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET +MAP-ID := INT-OR-CHAR + +;; Terminate the CCL program. +END := (end) + +;; CCL registers. These can contain any integer value. As r7 is used by the +;; CCL interpreter itself, its value can change unexpectedly. +REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7 + +ARG := REG | INT-OR-CHAR + +OPERATOR := + ;; Normal arithmetical operators (same meaning as C code). + + | - | * | / | % + + ;; Bitwise operators (same meaning as C code) + | & | `|' | ^ + + ;; Shifting operators (same meaning as C code) + | << | >> + + ;; (REG = ARG_0 <8 ARG_1) means: + ;; (REG = ((ARG_0 << 8) | ARG_1)) + | <8 + + ;; (REG = ARG_0 >8 ARG_1) means: + ;; ((REG = (ARG_0 >> 8)) + ;; (r7 = (ARG_0 & 255))) + | >8 + + ;; (REG = ARG_0 // ARG_1) means: + ;; ((REG = (ARG_0 / ARG_1)) + ;; (r7 = (ARG_0 % ARG_1))) + | // + + ;; Normal comparing operators (same meaning as C code) + | < | > | == | <= | >= | != + + ;; If ARG_0 and ARG_1 are higher and lower byte of Shift-JIS + ;; code, and CHAR is the corresponding JISX0208 character, + ;; (REG = ARG_0 de-sjis ARG_1) means: + ;; ((REG = CODE0) + ;; (r7 = CODE1)) + ;; where CODE0 is the first code point of CHAR, CODE1 is the + ;; second code point of CHAR. + | de-sjis + + ;; If ARG_0 and ARG_1 are the first and second code point of + ;; JISX0208 character CHAR, and SJIS is the correponding + ;; Shift-JIS code, + ;; (REG = ARG_0 en-sjis ARG_1) means: + ;; ((REG = HIGH) + ;; (r7 = LOW)) + ;; where HIGH is the higher byte of SJIS, LOW is the lower + ;; byte of SJIS. + | en-sjis + +ASSIGNMENT_OPERATOR := + ;; Same meaning as C code + += | -= | *= | /= | %= | &= | `|=' | ^= | <<= | >>= + + ;; (REG <8= ARG) is the same as: + ;; ((REG <<= 8) + ;; (REG |= ARG)) + | <8= + + ;; (REG >8= ARG) is the same as: + ;; ((r7 = (REG & 255)) + ;; (REG >>= 8)) + + ;; (REG //= ARG) is the same as: + ;; ((r7 = (REG % ARG)) + ;; (REG /= ARG)) + | //= + +ARRAY := `[' INT-OR-CHAR ... `]' + +INT-OR-CHAR := integer | character +" + `(let ((prog ,(ccl-compile (eval ccl-program)))) + (defconst ,name prog ,doc) + (put ',name 'ccl-program-idx (register-ccl-program ',name prog)) + nil)) + +;;;###autoload +(defmacro check-ccl-program (ccl-program &optional name) + "Check validity of CCL-PROGRAM. +If CCL-PROGRAM is a symbol denoting a CCL program, return +CCL-PROGRAM, else return nil. +If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied, +register CCL-PROGRAM by name NAME, and return NAME." + `(if (ccl-program-p ,ccl-program) + (if (vectorp ,ccl-program) + (progn + (register-ccl-program ,name ,ccl-program) + ,name) + ,ccl-program))) + +(provide 'ccl) + +;; ccl.el ends here \ No newline at end of file diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/chinese.el --- a/lisp/mule/chinese.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/chinese.el Sat Oct 25 21:40:46 2008 +0900 @@ -31,109 +31,11 @@ ;;; Code: -(eval-when-compile - (require 'china-util)) - -; (make-charset 'chinese-gb2312 -; "GB2312 Chinese simplified: ISO-IR-58" -; '(dimension -; 2 -; registry "GB2312.1980" -; chars 94 -; columns 2 -; direction l2r -; final ?A -; graphic 0 -; short-name "GB2312" -; long-name "GB2312: ISO-IR-58" -; )) - -; (make-charset 'chinese-cns11643-1 -; "CNS11643 Plane 1 Chinese traditional: ISO-IR-171" -; '(dimension -; 2 -; registry "CNS11643.1992-1" -; chars 94 -; columns 2 -; direction l2r -; final ?G -; graphic 0 -; short-name "CNS11643-1" -; long-name "CNS11643-1 (Chinese traditional): ISO-IR-171" -; )) - -; (make-charset 'chinese-cns11643-2 -; "CNS11643 Plane 2 Chinese traditional: ISO-IR-172" -; '(dimension -; 2 -; registry "CNS11643.1992-2" -; chars 94 -; columns 2 -; direction l2r -; final ?H -; graphic 0 -; short-name "CNS11643-2" -; long-name "CNS11643-2 (Chinese traditional): ISO-IR-172" -; )) - -; (make-charset 'chinese-big5-1 -; "Frequently used part (A141-C67F) of Big5 (Chinese traditional)" -; '(dimension -; 2 -; registry "Big5" -; chars 94 -; columns 2 -; direction l2r -; final ?0 -; graphic 0 -; short-name "Big5 (Level-1)" -; long-name "Big5 (Level-1) A141-C67F" -; )) - -; (make-charset 'chinese-big5-2 -; "Less frequently used part (C940-FEFE) of Big5 (Chinese traditional)" -; '(dimension -; 2 -; registry "Big5" -; chars 94 -; columns 2 -; direction l2r -; final ?1 -; graphic 0 -; short-name "Big5 (Level-2)" -; long-name "Big5 (Level-2) C940-FEFE" -; )) +(eval-when-compile (progn (require 'ccl) (require 'china-util))) ;; Syntax of Chinese characters. -(modify-syntax-entry 'chinese-gb2312 "w") (loop for row in '(33 34 41) do (modify-syntax-entry `[chinese-gb2312 ,row] ".")) -;;(loop for row from 35 to 40 -;; do (modify-syntax-entry `[chinese-gb2312 ,row] "w")) -;;(loop for row from 42 to 126 -;; do (modify-syntax-entry `[chinese-gb2312 ,row] "w")) - -(modify-syntax-entry 'chinese-cns11643-1 "w") -(modify-syntax-entry 'chinese-cns11643-2 "w") -(modify-syntax-entry 'chinese-big5-1 "w") -(modify-syntax-entry 'chinese-big5-2 "w") - -; ;; Chinese CNS11643 Plane3 thru Plane7. Although these are official -; ;; character sets, the use is rare and don't have to be treated -; ;; space-efficiently in the buffer. -; (make-charset 'chinese-cns11643-3 -; "CNS11643 Plane 3 Chinese Traditional: ISO-IR-183" -; '(dimension -; 2 -; registry "CNS11643.1992-3" -; chars 94 -; columns 2 -; direction l2r -; final ?I -; graphic 0 -; short-name "CNS11643-3" -; long-name "CNS11643-3 (Chinese traditional): ISO-IR-183" -; )) ;; CNS11643 Plane3 thru Plane7 ;; These represent more and more obscure Chinese characters. @@ -323,11 +225,6 @@ (coding-system cn-gb-2312 iso-2022-7bit hz-gb-2312) (coding-priority cn-gb-2312 big5 iso-2022-7bit) (cygwin-locale "zh") - (locale "zh_CN.eucCN" "zh_CN.EUC" "zh_CN" - "chinese-s" "zh" - (lambda (arg) - (and arg (let ((case-fold-search t)) - (string-match "^zh_.*.GB.*" arg))))) (mswindows-locale ("CHINESE" . "CHINESE_SIMPLIFIED")) (native-coding-system cn-gb-2312) (input-method . "chinese-py-punct") @@ -338,6 +235,14 @@ Uses the GB2312 character set.")) '("Chinese")) +;; Set the locale information separately so that the lambda gets compiled. +(set-language-info "Chinese-GB" + 'locale + (list "zh_CN.eucCN" "zh_CN.EUC" "zh_CN" "chinese-s" "zh" + (lambda (arg) + (and arg (let ((case-fold-search t)) + (string-match "^zh_.*.GB.*" arg)))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Chinese BIG5 (traditional) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -378,16 +283,13 @@ ;; R2:position code 2 ;; Out: R1:font code point 1 ;; R2:font code point 2 - ((r2 = ((((r1 - ?\x21) * 94) + r2) - ?\x21)) + ((r2 = ((((r1 - #x21) * 94) + r2) - #x21)) (if (r0 == ,(charset-id 'chinese-big5-2)) (r2 += 6280)) - (r1 = ((r2 / 157) + ?\xA1)) + (r1 = ((r2 / 157) + #xA1)) (r2 %= 157) - (if (r2 < ?\x3F) (r2 += ?\x40) (r2 += ?\x62)))) + (if (r2 < #x3F) (r2 += #x40) (r2 += #x62)))) "CCL program to encode a Big5 code to code point of Big5 font.") -;; (setq font-ccl-encoder-alist -;; (cons (cons "big5" ccl-encode-big5-font) font-ccl-encoder-alist)) - (set-charset-ccl-program 'chinese-big5-1 'ccl-encode-big5-font) (set-charset-ccl-program 'chinese-big5-2 'ccl-encode-big5-font) @@ -396,11 +298,6 @@ (coding-system big5 iso-2022-7bit) (coding-priority big5 cn-gb-2312 iso-2022-7bit) (cygwin-locale "zh_TW") - (locale "zh_TW.Big5" "zh_TW.big5" "zh_CN.big5" "zh_TW" - "chinese-t" - (lambda (arg) - (and arg (let ((case-fold-search t)) - (string-match "^zh_.*.BIG5.*" arg))))) (mswindows-locale ("CHINESE" . "CHINESE_TRADITIONAL")) (native-coding-system big5) (input-method . "chinese-py-punct-b5") @@ -412,6 +309,15 @@ )) '("Chinese")) +;; Set the locale information separately so that the lambda gets compiled. +(set-language-info "Chinese-BIG5" + 'locale + (list "zh_TW.Big5" "zh_TW.big5" "zh_CN.big5" "zh_TW" + "chinese-t" + (lambda (arg) + (and arg (let ((case-fold-search t)) + (string-match "^zh_.*.BIG5.*" arg)))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Chinese CNS11643 (traditional) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/cyril-util.el --- a/lisp/mule/cyril-util.el Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -;;; cyril-util.el --- utilities for Cyrillic scripts -*- coding: iso-2022-7bit; -*- - -;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Copyright (C) 2002 Ben Wing. - -;; Keywords: mule, multilingual, Cyrillic - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: Emacs 21.1 (language/cyril-util.el). - -;;; Commentary: - -;;; Code: - -;;;###autoload -(defun cyrillic-encode-koi8-r-char (char) - "Return KOI8-R external character code of CHAR if appropriate." - (get-char-table char cyrillic-koi8-r-to-external-code-table)) - -;;;###autoload -(defun cyrillic-encode-alternativnyj-char (char) - "Return ALTERNATIVNYJ external character code of CHAR if appropriate." - (get-char-table char cyrillic-alternativnyj-to-external-code-table)) - - -;; Display - -;; Written by Valery Alexeev . - -(defvar cyrillic-language-alist - (list '("Belorussian") '("Bulgarian") '("Macedonian") - '("Russian") '("Serbian") '("Ukrainian")) - "*List of known cyrillic languages") - -(defvar standard-display-table) - -;;;###autoload -(defun standard-display-cyrillic-translit (&optional cyrillic-language) - "Display a cyrillic buffer using a transliteration. -For readability, the table is slightly -different from the one used for the input method `cyrillic-translit'. - -The argument is a string which specifies which language you are using; -that affects the choice of transliterations slightly. -Possible values are listed in 'cyrillic-language-alist'. -If the argument is t, we use the default cyrillic transliteration. -If the argument is nil, we return the display table to its standard state." - (interactive - (list - (let* ((completion-ignore-case t)) - (completing-read - "Cyrillic language (default nil): " - cyrillic-language-alist nil t nil nil nil)))) - - (or standard-display-table - (setq standard-display-table (make-display-table))) - - (if (equal cyrillic-language "") - (setq cyrillic-language nil)) - - (if (null cyrillic-language) - (setq standard-display-table (make-display-table)) - (aset standard-display-table ?,LP(B [?a]) - (aset standard-display-table ?,LQ(B [?b]) - (aset standard-display-table ?,LR(B [?v]) - (aset standard-display-table ?,LS(B [?g]) - (aset standard-display-table ?,LT(B [?d]) - (aset standard-display-table ?,LU(B [?e]) - (aset standard-display-table ?,Lq(B [?y?o]) - (aset standard-display-table ?,LV(B [?z?h]) - (aset standard-display-table ?,LW(B [?z]) - (aset standard-display-table ?,LX(B [?i]) - (aset standard-display-table ?,LY(B [?j]) - (aset standard-display-table ?,LZ(B [?k]) - (aset standard-display-table ?,L[(B [?l]) - (aset standard-display-table ?,L\(B [?m]) - (aset standard-display-table ?,L](B [?n]) - (aset standard-display-table ?,L^(B [?o]) - (aset standard-display-table ?,L_(B [?p]) - (aset standard-display-table ?,L`(B [?r]) - (aset standard-display-table ?,La(B [?s]) - (aset standard-display-table ?,Lb(B [?t]) - (aset standard-display-table ?,Lc(B [?u]) - (aset standard-display-table ?,Ld(B [?f]) - (aset standard-display-table ?,Le(B [?k?h]) - (aset standard-display-table ?,Lf(B [?t?s]) - (aset standard-display-table ?,Lg(B [?c?h]) - (aset standard-display-table ?,Lh(B [?s?h]) - (aset standard-display-table ?,Li(B [?s?c?h]) - (aset standard-display-table ?,Lj(B [?~]) - (aset standard-display-table ?,Lk(B [?y]) - (aset standard-display-table ?,Ll(B [?']) - (aset standard-display-table ?,Lm(B [?e?']) - (aset standard-display-table ?,Ln(B [?y?u]) - (aset standard-display-table ?,Lo(B [?y?a]) - - (aset standard-display-table ?,L0(B [?A]) - (aset standard-display-table ?,L1(B [?B]) - (aset standard-display-table ?,L2(B [?V]) - (aset standard-display-table ?,L3(B [?G]) - (aset standard-display-table ?,L4(B [?D]) - (aset standard-display-table ?,L5(B [?E]) - (aset standard-display-table ?,L!(B [?Y?o]) - (aset standard-display-table ?,L6(B [?Z?h]) - (aset standard-display-table ?,L7(B [?Z]) - (aset standard-display-table ?,L8(B [?I]) - (aset standard-display-table ?,L9(B [?J]) - (aset standard-display-table ?,L:(B [?K]) - (aset standard-display-table ?,L;(B [?L]) - (aset standard-display-table ?,L<(B [?M]) - (aset standard-display-table ?,L=(B [?N]) - (aset standard-display-table ?,L>(B [?O]) - (aset standard-display-table ?,L?(B [?P]) - (aset standard-display-table ?,L@(B [?R]) - (aset standard-display-table ?,LA(B [?S]) - (aset standard-display-table ?,LB(B [?T]) - (aset standard-display-table ?,LC(B [?U]) - (aset standard-display-table ?,LD(B [?F]) - (aset standard-display-table ?,LE(B [?K?h]) - (aset standard-display-table ?,LF(B [?T?s]) - (aset standard-display-table ?,LG(B [?C?h]) - (aset standard-display-table ?,LH(B [?S?h]) - (aset standard-display-table ?,LI(B [?S?c?h]) - (aset standard-display-table ?,LJ(B [?~]) - (aset standard-display-table ?,LK(B [?Y]) - (aset standard-display-table ?,LL(B [?']) - (aset standard-display-table ?,LM(B [?E?']) - (aset standard-display-table ?,LN(B [?Y?u]) - (aset standard-display-table ?,LO(B [?Y?a]) - - (aset standard-display-table ?,Lt(B [?i?e]) - (aset standard-display-table ?,Lw(B [?i]) - (aset standard-display-table ?,L~(B [?u]) - (aset standard-display-table ?,Lr(B [?d?j]) - (aset standard-display-table ?,L{(B [?c?h?j]) - (aset standard-display-table ?,Ls(B [?g?j]) - (aset standard-display-table ?,Lu(B [?s]) - (aset standard-display-table ?,L|(B [?k]) - (aset standard-display-table ?,Lv(B [?i]) - (aset standard-display-table ?,Lx(B [?j]) - (aset standard-display-table ?,Ly(B [?l?j]) - (aset standard-display-table ?,Lz(B [?n?j]) - (aset standard-display-table ?,L(B [?d?z]) - - (aset standard-display-table ?,L$(B [?Y?e]) - (aset standard-display-table ?,L'(B [?Y?i]) - (aset standard-display-table ?,L.(B [?U]) - (aset standard-display-table ?,L"(B [?D?j]) - (aset standard-display-table ?,L+(B [?C?h?j]) - (aset standard-display-table ?,L#(B [?G?j]) - (aset standard-display-table ?,L%(B [?S]) - (aset standard-display-table ?,L,(B [?K]) - (aset standard-display-table ?,L&(B [?I]) - (aset standard-display-table ?,L((B [?J]) - (aset standard-display-table ?,L)(B [?L?j]) - (aset standard-display-table ?,L*(B [?N?j]) - (aset standard-display-table ?,L/(B [?D?j]) - - (when (equal cyrillic-language "Bulgarian") - (aset standard-display-table ?,Li(B [?s?h?t]) - (aset standard-display-table ?,LI(B [?S?h?t]) - (aset standard-display-table ?,Ln(B [?i?u]) - (aset standard-display-table ?,LN(B [?I?u]) - (aset standard-display-table ?,Lo(B [?i?a]) - (aset standard-display-table ?,LO(B [?I?a])) - - (when (equal cyrillic-language "Ukrainian") ; based on the official - ; transliteration table - (aset standard-display-table ?,LX(B [?y]) - (aset standard-display-table ?,L8(B [?Y]) - (aset standard-display-table ?,LY(B [?i]) - (aset standard-display-table ?,L9(B [?Y]) - (aset standard-display-table ?,Ln(B [?i?u]) - (aset standard-display-table ?,Lo(B [?i?a])))) - - -;; -(provide 'cyril-util) - -;; Local Variables: -;; coding: iso-2022-7bit -;; End: - -;;; cyril-util.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/cyrillic.el --- a/lisp/mule/cyrillic.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/cyrillic.el Sat Oct 25 21:40:46 2008 +0900 @@ -4,6 +4,7 @@ ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1997 MORIOKA Tomohiko ;; Copyright (C) 2001, 2002 Ben Wing. +;; Copyright (C) 2007 Free Software Foundation ;; Keywords: multilingual, Cyrillic @@ -29,16 +30,6 @@ ;; The character set ISO8859-5 is supported. KOI-8 and ALTERNATIVNYJ are ;; converted to ISO8859-5 internally. -;; [Windows-1251 support deleted because XEmacs has automatic support.] - -;; #### We only have automatic support on Windows; that needs to be put -;; back. Also, the Russian Wikipedia articles on KOI-8 list several other -;; related encodings--KOI8-U (Ukrainian), KOI8-RU (simultaneous support for -;; Russian, Belorussian, and Ukrainian), KOI8-C (for languages of the -;; Caucasus), KOI8-O (Old Church Slavonic)--and it would be nice to have -;; them. Beyond that, we're currently trashing lots of code points with -;; KOI-8 R; it would be nice to leverage the Unicode support to not do that. - ;;; Code: ;; Case table: @@ -93,8 +84,8 @@ with case-table = (standard-case-table) do (put-case-table-pair (make-char 'cyrillic-iso8859-5 upper) - (make-char 'cyrillic-iso8859-5 lower) - case-table)) + (make-char 'cyrillic-iso8859-5 lower) + case-table)) ;; The default character syntax is now word. Pay attention to the ;; exceptions in ISO-8859-5, copying them from ISO-8859-1. @@ -114,235 +105,1330 @@ (string (char-syntax ?\# (standard-syntax-table))) (standard-syntax-table)) -(make-coding-system - 'iso-8859-5 'iso2022 +;; And create the coding system. +(make-8-bit-coding-system + 'iso-8859-5 + '((#xA1 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xA2 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE + (#xA3 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE + (#xA4 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xA5 ?\u0405) ;; CYRILLIC CAPITAL LETTER DZE + (#xA6 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xA7 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xA8 ?\u0408) ;; CYRILLIC CAPITAL LETTER JE + (#xA9 ?\u0409) ;; CYRILLIC CAPITAL LETTER LJE + (#xAA ?\u040A) ;; CYRILLIC CAPITAL LETTER NJE + (#xAB ?\u040B) ;; CYRILLIC CAPITAL LETTER TSHE + (#xAC ?\u040C) ;; CYRILLIC CAPITAL LETTER KJE + (#xAE ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xAF ?\u040F) ;; CYRILLIC CAPITAL LETTER DZHE + (#xB0 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xB1 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xB2 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xB3 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xB4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xB5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xB6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xB7 ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xB8 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xB9 ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xBA ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xBB ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xBC ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xBD ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xBE ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xBF ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xC0 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xC1 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xC2 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xC3 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xC4 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xC5 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xC6 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xC7 ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xC8 ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xC9 ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xCA ?\u042A) ;; CYRILLIC CAPITAL LETTER HARD SIGN + (#xCB ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xCC ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xCD ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xCE ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xCF ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xD0 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xD1 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xD2 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD3 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xD4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xD5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xD8 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xD9 ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xDA ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xDB ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xDC ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xDD ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xDE ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xDF ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xE0 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xE1 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xE2 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xE3 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xE4 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xE5 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xE6 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xE7 ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xE8 ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xE9 ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xEA ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xEB ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xEC ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xED ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xEE ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xEF ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xF0 ?\u2116) ;; NUMERO SIGN + (#xF1 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xF2 ?\u0452) ;; CYRILLIC SMALL LETTER DJE + (#xF3 ?\u0453) ;; CYRILLIC SMALL LETTER GJE + (#xF4 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xF5 ?\u0455) ;; CYRILLIC SMALL LETTER DZE + (#xF6 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xF7 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xF8 ?\u0458) ;; CYRILLIC SMALL LETTER JE + (#xF9 ?\u0459) ;; CYRILLIC SMALL LETTER LJE + (#xFA ?\u045A) ;; CYRILLIC SMALL LETTER NJE + (#xFB ?\u045B) ;; CYRILLIC SMALL LETTER TSHE + (#xFC ?\u045C) ;; CYRILLIC SMALL LETTER KJE + (#xFD ?\u00A7) ;; SECTION SIGN + (#xFE ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xFF ?\u045F)) ;; CYRILLIC SMALL LETTER DZHE "ISO-8859-5 (Cyrillic)" - '(charset-g0 ascii - charset-g1 cyrillic-iso8859-5 - charset-g2 t - charset-g3 t - mnemonic "ISO8/Cyr")) + '(mnemonic "ISO8/Cyr" + documentation "The ISO standard for encoding Cyrillic. Not used in practice. +See `koi8-r' and `windows-1250'. " + aliases (cyrillic-iso-8bit))) + +;; Provide this locale; but don't allow it to be picked up from the Unix +;; locale (it has no locale entry in the alist), we leave that to Russian. +(set-language-info-alist + "Cyrillic-ISO" '((charset cyrillic-iso8859-5) + (tutorial . "TUTORIAL.ru") + (coding-system iso-8859-5) + (native-coding-system iso-8859-5) + (coding-priority iso-8859-5) + (input-method . "cyrillic-yawerty") + (features cyril-util) + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Cyrillic ISO-8859-5.")) + '("Cyrillic")) + +;; KOI8-R, the most common encoding for Cyrillic on Unix and Usenet. +(make-8-bit-coding-system + 'koi8-r + '((#x80 ?\u2500) ;; BOX DRAWINGS LIGHT HORIZONTAL + (#x81 ?\u2502) ;; BOX DRAWINGS LIGHT VERTICAL + (#x82 ?\u250C) ;; BOX DRAWINGS LIGHT DOWN AND RIGHT + (#x83 ?\u2510) ;; BOX DRAWINGS LIGHT DOWN AND LEFT + (#x84 ?\u2514) ;; BOX DRAWINGS LIGHT UP AND RIGHT + (#x85 ?\u2518) ;; BOX DRAWINGS LIGHT UP AND LEFT + (#x86 ?\u251C) ;; BOX DRAWINGS LIGHT VERTICAL AND RIGHT + (#x87 ?\u2524) ;; BOX DRAWINGS LIGHT VERTICAL AND LEFT + (#x88 ?\u252C) ;; BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + (#x89 ?\u2534) ;; BOX DRAWINGS LIGHT UP AND HORIZONTAL + (#x8A ?\u253C) ;; BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + (#x8B ?\u2580) ;; UPPER HALF BLOCK + (#x8C ?\u2584) ;; LOWER HALF BLOCK + (#x8D ?\u2588) ;; FULL BLOCK + (#x8E ?\u258C) ;; LEFT HALF BLOCK + (#x8F ?\u2590) ;; RIGHT HALF BLOCK + (#x90 ?\u2591) ;; LIGHT SHADE + (#x91 ?\u2592) ;; MEDIUM SHADE + (#x92 ?\u2593) ;; DARK SHADE + (#x93 ?\u2320) ;; TOP HALF INTEGRAL + (#x94 ?\u25A0) ;; BLACK SQUARE + (#x95 ?\u2219) ;; BULLET OPERATOR + (#x96 ?\u221A) ;; SQUARE ROOT + (#x97 ?\u2248) ;; ALMOST EQUAL TO + (#x98 ?\u2264) ;; LESS-THAN OR EQUAL TO + (#x99 ?\u2265) ;; GREATER-THAN OR EQUAL TO + (#x9A ?\u00A0) ;; NO-BREAK SPACE + (#x9B ?\u2321) ;; BOTTOM HALF INTEGRAL + (#x9C ?\u00B0) ;; DEGREE SIGN + (#x9D ?\u00B2) ;; SUPERSCRIPT TWO + (#x9E ?\u00B7) ;; MIDDLE DOT + (#x9F ?\u00F7) ;; DIVISION SIGN + (#xA0 ?\u2550) ;; BOX DRAWINGS DOUBLE HORIZONTAL + (#xA1 ?\u2551) ;; BOX DRAWINGS DOUBLE VERTICAL + (#xA2 ?\u2552) ;; BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u2553) ;; BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + (#xA5 ?\u2554) ;; BOX DRAWINGS DOUBLE DOWN AND RIGHT + (#xA6 ?\u2555) ;; BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + (#xA7 ?\u2556) ;; BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + (#xA8 ?\u2557) ;; BOX DRAWINGS DOUBLE DOWN AND LEFT + (#xA9 ?\u2558) ;; BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + (#xAA ?\u2559) ;; BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + (#xAB ?\u255A) ;; BOX DRAWINGS DOUBLE UP AND RIGHT + (#xAC ?\u255B) ;; BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + (#xAD ?\u255C) ;; BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + (#xAE ?\u255D) ;; BOX DRAWINGS DOUBLE UP AND LEFT + (#xAF ?\u255E) ;; BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + (#xB0 ?\u255F) ;; BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + (#xB1 ?\u2560) ;; BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + (#xB2 ?\u2561) ;; BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB4 ?\u2562) ;; BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + (#xB5 ?\u2563) ;; BOX DRAWINGS DOUBLE VERTICAL AND LEFT + (#xB6 ?\u2564) ;; BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + (#xB7 ?\u2565) ;; BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + (#xB8 ?\u2566) ;; BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + (#xB9 ?\u2567) ;; BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + (#xBA ?\u2568) ;; BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + (#xBB ?\u2569) ;; BOX DRAWINGS DOUBLE UP AND HORIZONTAL + (#xBC ?\u256A) ;; BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + (#xBD ?\u256B) ;; BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + (#xBE ?\u256C) ;; BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + (#xBF ?\u00A9) ;; COPYRIGHT SIGN + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN + "KOI8-R (,L:^T(B ,L>Q\U]P(B ,L8]d^`\PfXUY(B, 8 ,LQXb(B) for Russian and Bulgarian." + '(mnemonic "KOI8" + documentation + "This is the ASCII-compatible encoding documented in RFC 1341. +,L:>8(B8-,L@(B is very common across the Cyrillic-using internet and in Unix +implementations; it shares the useful property with the other ,L:>8(B8 +encodings that when the high bit is stripped, encoded text remains +readable (Cyrillic characters get mapped to corresponding Roman +character of the opposite case). " + aliases (cyrillic-koi8 koi8 cp878))) + +;; Create a corresponding language environment. +(set-language-info-alist + "Russian" '((charset cyrillic-iso8859-5) + (coding-system koi8-r) + (native-coding-system koi8-r) + (coding-priority koi8-r) + (invalid-sequence-coding-system koi8-r) + (input-method . "cyrillic-yawerty") + (features cyril-util) + (locale "ru") + (mswindows-locale . "RUSSIAN") + (tutorial . "TUTORIAL.ru") + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Russian.")) + '("Cyrillic")) + +;; Provide Cyrillic-KOI8 for old times' sake too, but don't allow it to be +;; selected by the Unix locale. A variant language environment called +;; "Cyrillic-KOI8 (UTF-8)" just looks too odd. (set-language-info-alist - "Cyrillic-ISO" '((charset cyrillic-iso8859-5) - (tutorial . "TUTORIAL.ru") - (coding-system iso-8859-5) - (native-coding-system iso-8859-5) - (coding-priority iso-8859-5) - (input-method . "cyrillic-yawerty") - (features cyril-util) - (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") - (documentation . "Support for Cyrillic ISO-8859-5.")) + "Cyrillic-KOI8" + (remassq 'locale (copy-list (cdr (assoc "Russian" language-info-alist)))) '("Cyrillic")) -;; KOI-8 - -(eval-and-compile - -(defvar cyrillic-koi8-r-decode-table - [ - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?$B(!(B ?$B("(B ?$B(#(B ?$B($(B ?$B(&(B ?$B(%(B ?$B('(B ?$B()(B ?$B(((B ?$B(*(B ?$B(+(B 32 ?$(G#'(B ?$(G#+(B ?$(G#/(B 32 - 32 ?$(C"F(B 32 32 ?$B"#(B 32 ?$B"e(B ?$A!V(B ?$A!\(B ?$A!](B ?,L (B 32 ?,A0(B ?,A2(B ?,A7(B ?,Aw(B - ?$(G#D(B 32 32 ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 ?$(G#E(B - 32 32 ?$(G#G(B ?,L!(B 32 32 32 32 32 32 32 32 ?$(G#F(B 32 32 ?,A)(B - ?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B - ?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B - ?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B - ?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B ] - "Cyrillic KOI8-R decoding table.") - -(defvar cyrillic-koi8-r-encode-table - (let ((table (make-vector 256 32)) - (i 0)) - (while (< i 256) - (let* ((ch (aref cyrillic-koi8-r-decode-table i)) - (split (split-char ch))) - (cond ((eq (car split) 'cyrillic-iso8859-5) - (aset table (logior (nth 1 split) 128) i)) - ((eq ch 32)) - ((eq (car split) 'ascii) - (aset table ch i)))) - (setq i (1+ i))) - table) - "Cyrillic KOI8-R encoding table.") - -) +;; KOI8-U, for Ukrainian. +(make-8-bit-coding-system + 'koi8-u + '((#x80 ?\u2500) ;; BOX DRAWINGS LIGHT HORIZONTAL + (#x81 ?\u2502) ;; BOX DRAWINGS LIGHT VERTICAL + (#x82 ?\u250C) ;; BOX DRAWINGS LIGHT DOWN AND RIGHT + (#x83 ?\u2510) ;; BOX DRAWINGS LIGHT DOWN AND LEFT + (#x84 ?\u2514) ;; BOX DRAWINGS LIGHT UP AND RIGHT + (#x85 ?\u2518) ;; BOX DRAWINGS LIGHT UP AND LEFT + (#x86 ?\u251C) ;; BOX DRAWINGS LIGHT VERTICAL AND RIGHT + (#x87 ?\u2524) ;; BOX DRAWINGS LIGHT VERTICAL AND LEFT + (#x88 ?\u252C) ;; BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + (#x89 ?\u2534) ;; BOX DRAWINGS LIGHT UP AND HORIZONTAL + (#x8A ?\u253C) ;; BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + (#x8B ?\u2580) ;; UPPER HALF BLOCK + (#x8C ?\u2584) ;; LOWER HALF BLOCK + (#x8D ?\u2588) ;; FULL BLOCK + (#x8E ?\u258C) ;; LEFT HALF BLOCK + (#x8F ?\u2590) ;; RIGHT HALF BLOCK + (#x90 ?\u2591) ;; LIGHT SHADE + (#x91 ?\u2592) ;; MEDIUM SHADE + (#x92 ?\u2593) ;; DARK SHADE + (#x93 ?\u2320) ;; TOP HALF INTEGRAL + (#x94 ?\u25A0) ;; BLACK SQUARE + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u221A) ;; SQUARE ROOT + (#x97 ?\u2248) ;; ALMOST EQUAL TO + (#x98 ?\u2264) ;; LESS-THAN OR EQUAL TO + (#x99 ?\u2265) ;; GREATER-THAN OR EQUAL TO + (#x9A ?\u00A0) ;; NO-BREAK SPACE + (#x9B ?\u2321) ;; BOTTOM HALF INTEGRAL + (#x9C ?\u00B0) ;; DEGREE SIGN + (#x9D ?\u00B2) ;; SUPERSCRIPT TWO + (#x9E ?\u00B7) ;; MIDDLE DOT + (#x9F ?\u00F7) ;; DIVISION SIGN + (#xA0 ?\u2550) ;; BOX DRAWINGS DOUBLE HORIZONTAL + (#xA1 ?\u2551) ;; BOX DRAWINGS DOUBLE VERTICAL + (#xA2 ?\u2552) ;; BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xA5 ?\u2554) ;; BOX DRAWINGS DOUBLE DOWN AND RIGHT + (#xA6 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xA7 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xA8 ?\u2557) ;; BOX DRAWINGS DOUBLE DOWN AND LEFT + (#xA9 ?\u2558) ;; BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + (#xAA ?\u2559) ;; BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + (#xAB ?\u255A) ;; BOX DRAWINGS DOUBLE UP AND RIGHT + (#xAC ?\u255B) ;; BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + (#xAD ?\u0491) ;; CYRILLIC SMALL LETTER GHE WITH UPTURN + (#xAE ?\u255D) ;; BOX DRAWINGS DOUBLE UP AND LEFT + (#xAF ?\u255E) ;; BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + (#xB0 ?\u255F) ;; BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + (#xB1 ?\u2560) ;; BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + (#xB2 ?\u2561) ;; BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB4 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xB5 ?\u2563) ;; BOX DRAWINGS DOUBLE VERTICAL AND LEFT + (#xB6 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB7 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xB8 ?\u2566) ;; BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + (#xB9 ?\u2567) ;; BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + (#xBA ?\u2568) ;; BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + (#xBB ?\u2569) ;; BOX DRAWINGS DOUBLE UP AND HORIZONTAL + (#xBC ?\u256A) ;; BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + (#xBD ?\u0490) ;; CYRILLIC CAPITAL LETTER GHE WITH UPTURN + (#xBE ?\u256C) ;; BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + (#xBF ?\u00A9) ;; COPYRIGHT SIGN + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A)) ;; CYRILLIC CAPITAL LETTER HARD SIGN + "KOI8-U, for Ukrainian" + '(mnemonic ",L:>8(B8,LC(B" + documentation + "KOI8-U, a KOI-8-compatible encoding for Ukrainian, described in RFC2319. +This has GHE WITH UPTURN, BYELORUSSIAN-UKRAINIAN I, UKRAINIAN IE and +YI instead of some box-drawing characters. Russian in this encoding +(without using box-drawing characters) is bit-for-bit compatible with +Russian in KOI8-R. ")) -(define-ccl-program ccl-decode-koi8 - `(3 - ((read r0) - (loop - (write-read-repeat r0 ,cyrillic-koi8-r-decode-table)))) - "CCL program to decode KOI8.") - -(define-ccl-program ccl-encode-koi8 - `(1 - ((read r0) - (loop - (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) - (write-read-repeat r0) - ((read r0) - (write-read-repeat r0 , cyrillic-koi8-r-encode-table)))))) - "CCL program to encode KOI8.") - -;; (define-coding-system-alias 'koi8-r 'cyrillic-koi8) -;; (define-coding-system-alias 'koi8 'cyrillic-koi8) - -(make-coding-system - 'koi8-r 'ccl - "KOI8-R (Cyrillic)" - '(decode ccl-decode-koi8 - encode ccl-encode-koi8 - mnemonic "KOI8")) - -;; `iso-8-1' is not correct, but XEmacs doesn't have a `ccl' category -(coding-system-put 'koi8-r 'category 'iso-8-1) - -;; (define-ccl-program ccl-encode-koi8-font -;; `(0 -;; ((r1 |= 128) -;; (r1 = r1 ,cyrillic-koi8-r-encode-table))) -;; "CCL program to encode Cyrillic chars to KOI font.") - -;; (setq font-ccl-encoder-alist -;; (cons (cons "koi8" ccl-encode-koi8-font) font-ccl-encoder-alist)) - -(defvar cyrillic-koi8-r-to-external-code-table - (let ((table (make-char-table 'generic)) - (i 0) - (len (length cyrillic-koi8-r-decode-table))) - (while (< i len) - (let ((ch (aref cyrillic-koi8-r-decode-table i))) - (if (characterp ch) - (put-char-table ch i table))) - (incf i))) - "Table to convert from characters to their Koi8-R code.") +;; Case support, for the new characters. +(loop + for (upper lower) + in '((?\u0404 ?\u0454) ; UKRAINIAN IE + (?\u0406 ?\u0456) ; BYELORUSSIAN-UKRAINIAN I + (?\u0407 ?\u0457) ; YI + (?\u0490 ?\u0491)); GHE WITH UPTURN + with case-table = (standard-case-table) + do + (put-case-table-pair upper lower case-table)) (set-language-info-alist - "Cyrillic-KOI8" '((charset cyrillic-iso8859-5) - (coding-system koi8-r) - (native-coding-system koi8-r) - (coding-priority koi8-r) - (input-method . "cyrillic-yawerty") - (features cyril-util) - (locale "ru") - (mswindows-locale . "RUSSIAN") - (tutorial . "TUTORIAL.ru") - (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") - (documentation . "Support for Cyrillic KOI8-R.")) + "Ukrainian" '((coding-system koi8-u) + (coding-priority koi8-u) + (locale "uk") + (invalid-sequence-coding-system koi8-u) + (input-method . "cyrillic-ukrainian") + (documentation + . "Support for Ukrainian.")) '("Cyrillic")) -;;; WINDOWS-1251 deleted; we support it automatically in XEmacs - -;;; ALTERNATIVNYJ - -(eval-and-compile - -(defvar cyrillic-alternativnyj-decode-table - [ - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 - 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?,L0(B ?,L1(B ?,L2(B ?,L3(B ?,L4(B ?,L5(B ?,L6(B ?,L7(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B ?,L?(B - ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,LD(B ?,LE(B ?,LF(B ?,LG(B ?,LH(B ?,LI(B ?,LJ(B ?,LK(B ?,LL(B ?,LM(B ?,LN(B ?,LO(B - ?,LP(B ?,LQ(B ?,LR(B ?,LS(B ?,LT(B ?,LU(B ?,LV(B ?,LW(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B ?,L_(B - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 - ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,Ld(B ?,Le(B ?,Lf(B ?,Lg(B ?,Lh(B ?,Li(B ?,Lj(B ?,Lk(B ?,Ll(B ?,Lm(B ?,Ln(B ?,Lo(B - ?,L!(B ?,Lq(B 32 32 32 32 32 32 32 32 32 32 32 32 32 ?,Lp(B] - "Cyrillic ALTERNATIVNYJ decoding table.") - -(defvar cyrillic-alternativnyj-encode-table - (let ((table (make-vector 256 32)) - (i 0)) - (while (< i 256) - (let* ((ch (aref cyrillic-alternativnyj-decode-table i)) - (split (split-char ch))) - (if (eq (car split) 'cyrillic-iso8859-5) - (aset table (logior (nth 1 split) 128) i) - (if (/= ch 32) - (aset table ch i)))) - (setq i (1+ i))) - table) - "Cyrillic ALTERNATIVNYJ encoding table.") - -) - +(make-8-bit-coding-system + 'windows-1251 + '((#x80 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE + (#x81 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0453) ;; CYRILLIC SMALL LETTER GJE + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x88 ?\u20AC) ;; EURO SIGN + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u0409) ;; CYRILLIC CAPITAL LETTER LJE + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u040A) ;; CYRILLIC CAPITAL LETTER NJE + (#x8D ?\u040C) ;; CYRILLIC CAPITAL LETTER KJE + (#x8E ?\u040B) ;; CYRILLIC CAPITAL LETTER TSHE + (#x8F ?\u040F) ;; CYRILLIC CAPITAL LETTER DZHE + (#x90 ?\u0452) ;; CYRILLIC SMALL LETTER DJE + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9A ?\u0459) ;; CYRILLIC SMALL LETTER LJE + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u045A) ;; CYRILLIC SMALL LETTER NJE + (#x9D ?\u045C) ;; CYRILLIC SMALL LETTER KJE + (#x9E ?\u045B) ;; CYRILLIC SMALL LETTER TSHE + (#x9F ?\u045F) ;; CYRILLIC SMALL LETTER DZHE + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xA2 ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xA3 ?\u0408) ;; CYRILLIC CAPITAL LETTER JE + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u0490) ;; CYRILLIC CAPITAL LETTER GHE WITH UPTURN + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xA8 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAA ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xAF ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB3 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB4 ?\u0491) ;; CYRILLIC SMALL LETTER GHE WITH UPTURN + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB8 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xB9 ?\u2116) ;; NUMERO SIGN + (#xBA ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u0458) ;; CYRILLIC SMALL LETTER JE + (#xBD ?\u0405) ;; CYRILLIC CAPITAL LETTER DZE + (#xBE ?\u0455) ;; CYRILLIC SMALL LETTER DZE + (#xBF ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xC0 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xC1 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xC2 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xC3 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xC4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xC5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xC6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xC7 ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xC8 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xC9 ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xCA ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xCB ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xCC ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xCD ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xCE ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xCF ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xD0 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xD1 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xD2 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xD3 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xD4 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xD5 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xD6 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xD7 ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xD8 ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xD9 ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xDA ?\u042A) ;; CYRILLIC CAPITAL LETTER HARD SIGN + (#xDB ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xDC ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xDD ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xDE ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xDF ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xE0 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xE1 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xE2 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xE3 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xE4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xE5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xE6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xE7 ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xE8 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xE9 ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xEA ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xEB ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xEC ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xED ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xEE ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xEF ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xF0 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xF1 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xF2 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xF3 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xF4 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xF5 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xF6 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xF7 ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xF8 ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xF9 ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xFA ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xFB ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xFC ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xFD ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xFE ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xFF ?\u044F)) ;; CYRILLIC SMALL LETTER YA + "Microsoft's Code Page 1251, for Russian, Bulgarian, Serbian and others. " + '(mnemonic "CyrW" + documentation + "This ASCII-compatible encoding is unfortunately not compatible at +the code point level with the KOI8 family of encodings, but it +provides several widely-used punctuation and quotation marks that +KOI-8R and its relatives don't, and has become widely used. " + aliases (cp1251))) -(define-ccl-program ccl-decode-alternativnyj - `(3 - ((read r0) - (loop - (write-read-repeat r0 ,cyrillic-alternativnyj-decode-table)))) - "CCL program to decode Alternativnyj.") +(set-language-info-alist + "Bulgarian" '((coding-system windows-1251) + (coding-priority windows-1251) + (invalid-sequence-coding-system windows-1251) + (input-method . "bulgarian-bds") + (locale "bg") + (documentation + . "Support for Bulgarian. ") + (tutorial . "TUTORIAL.bg")) + '("Cyrillic")) -(define-ccl-program ccl-encode-alternativnyj - `(1 - ((read r0) - (loop - (if (r0 != ,(charset-id 'cyrillic-iso8859-5)) - (write-read-repeat r0) - ((read r0) - (write-read-repeat r0 ,cyrillic-alternativnyj-encode-table)))))) - "CCL program to encode Alternativnyj.") - -;; (define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj) +(set-language-info-alist + "Belarusian" '((coding-system windows-1251) + (coding-priority windows-1251) + (invalid-sequence-coding-system windows-1251) + (locale "be") + (input-method . "belarusian") + (documentation + . "Support for Belarusian. \(The name Belarusian replaced\ +Byelorussian in the early 1990s.)")) + '("Cyrillic")) -(make-coding-system - 'alternativnyj 'ccl - "Alternativnyj (Cyrillic)" - '(decode ccl-decode-alternativnyj - encode ccl-encode-alternativnyj - mnemonic "Cy.Alt")) - -;; `iso-8-1' is not correct, but XEmacs doesn't have `ccl' category -(coding-system-put 'alternativnyj 'category 'iso-8-1) - -;; (define-ccl-program ccl-encode-alternativnyj-font -;; '(0 -;; ((r1 |= 128) -;; (r1 = r1 ,cyrillic-alternativnyj-encode-table))) -;; "CCL program to encode Cyrillic chars to Alternativnyj font.") - -;; (setq font-ccl-encoder-alist -;; (cons (cons "alternativnyj" ccl-encode-alternativnyj-font) -;; font-ccl-encoder-alist)) - -(defvar cyrillic-alternativnyj-to-external-code-table - (let ((table (make-char-table 'generic)) - (i 0) - (len (length cyrillic-alternativnyj-decode-table))) - (while (< i len) - (let ((ch (aref cyrillic-alternativnyj-decode-table i))) - (if (characterp ch) - (put-char-table ch i table))) - (incf i))) - "Table to convert from characters to their Alternativnyj code.") +;;; Alternativnyj +(make-8-bit-coding-system + 'alternativnyj + '((#x80 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#x81 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#x82 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#x83 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#x84 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#x85 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#x86 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#x87 ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#x88 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#x89 ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#x8A ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#x8B ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#x8C ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#x8D ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#x8E ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#x8F ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#x90 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#x91 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#x92 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#x93 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#x94 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#x95 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#x96 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#x97 ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#x98 ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#x99 ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#x9A ?\u042A) ;; CYRILLIC CAPITAL LETTER HARD SIGN + (#x9B ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#x9C ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#x9D ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#x9E ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#x9F ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xA0 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xA1 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xA2 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xA3 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xA4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xA5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xA6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xA7 ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xA8 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xA9 ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xAA ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xAB ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xAC ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xAD ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xAE ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xAF ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xB0 ?\u2591) ;; LIGHT SHADE + (#xB1 ?\u2592) ;; MEDIUM SHADE + (#xB2 ?\u2593) ;; DARK SHADE + (#xB3 ?\u2502) ;; BOX DRAWINGS LIGHT VERTICAL + (#xB4 ?\u2524) ;; BOX DRAWINGS LIGHT VERTICAL AND LEFT + (#xB5 ?\u2561) ;; BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + (#xB6 ?\u2562) ;; BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + (#xB7 ?\u2556) ;; BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + (#xB8 ?\u2555) ;; BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + (#xB9 ?\u2563) ;; BOX DRAWINGS DOUBLE VERTICAL AND LEFT + (#xBA ?\u2551) ;; BOX DRAWINGS DOUBLE VERTICAL + (#xBB ?\u2557) ;; BOX DRAWINGS DOUBLE DOWN AND LEFT + (#xBC ?\u255D) ;; BOX DRAWINGS DOUBLE UP AND LEFT + (#xBD ?\u255C) ;; BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + (#xBE ?\u255B) ;; BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + (#xBF ?\u2510) ;; BOX DRAWINGS LIGHT DOWN AND LEFT + (#xC0 ?\u2514) ;; BOX DRAWINGS LIGHT UP AND RIGHT + (#xC1 ?\u2534) ;; BOX DRAWINGS LIGHT UP AND HORIZONTAL + (#xC2 ?\u252C) ;; BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + (#xC3 ?\u251C) ;; BOX DRAWINGS LIGHT VERTICAL AND RIGHT + (#xC4 ?\u2500) ;; BOX DRAWINGS LIGHT HORIZONTAL + (#xC5 ?\u253C) ;; BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + (#xC6 ?\u255E) ;; BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + (#xC7 ?\u255F) ;; BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + (#xC8 ?\u255A) ;; BOX DRAWINGS DOUBLE UP AND RIGHT + (#xC9 ?\u2554) ;; BOX DRAWINGS DOUBLE DOWN AND RIGHT + (#xCA ?\u2569) ;; BOX DRAWINGS DOUBLE UP AND HORIZONTAL + (#xCB ?\u2566) ;; BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + (#xCC ?\u2560) ;; BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + (#xCD ?\u2550) ;; BOX DRAWINGS DOUBLE HORIZONTAL + (#xCE ?\u256C) ;; BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + (#xCF ?\u2567) ;; BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + (#xD0 ?\u2568) ;; BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + (#xD1 ?\u2564) ;; BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + (#xD2 ?\u2565) ;; BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + (#xD3 ?\u2559) ;; BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + (#xD4 ?\u2558) ;; BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + (#xD5 ?\u2552) ;; BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + (#xD6 ?\u2553) ;; BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + (#xD7 ?\u256B) ;; BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + (#xD8 ?\u256A) ;; BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + (#xD9 ?\u2518) ;; BOX DRAWINGS LIGHT UP AND LEFT + (#xDA ?\u250C) ;; BOX DRAWINGS LIGHT DOWN AND RIGHT + (#xDB ?\u2588) ;; FULL BLOCK + (#xDC ?\u2584) ;; LOWER HALF BLOCK + (#xDD ?\u258C) ;; LEFT HALF BLOCK + (#xDE ?\u2590) ;; RIGHT HALF BLOCK + (#xDF ?\u2580) ;; UPPER HALF BLOCK + (#xE0 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xE1 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xE2 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xE3 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xE4 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xE5 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xE6 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xE7 ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xE8 ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xE9 ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xEA ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xEB ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xEC ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xED ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xEE ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xEF ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xF0 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xF1 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xF2 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xF3 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xF4 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xF5 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xF6 ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xF7 ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xF8 ?\u00B0) ;; DEGREE SIGN + (#xF9 ?\u2022) ;; BULLET + (#xFA ?\u00B7) ;; MIDDLE DOT + (#xFB ?\u221A) ;; SQUARE ROOT + (#xFC ?\u2116) ;; NUMERO SIGN + (#xFD ?\u00A4) ;; CURRENCY SIGN + (#xFE ?\u25A0) ;; BLACK SQUARE + (#xFF ?\u00A0)) ;; NO-BREAK SPACE + "Alternativnyj (Cyrillic). Microsoft's Code Page 966. " + '(mnemonic "Cy.Alt" + aliases (cp866))) (set-language-info-alist "Cyrillic-ALT" '((charset cyrillic-iso8859-5) - (coding-system alternativnyj) - (native-coding-system alternativnyj) - (coding-priority alternativnyj) - (input-method . "cyrillic-yawerty") - (features cyril-util) - (tutorial . "TUTORIAL.ru") - (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") - (documentation . "Support for Cyrillic ALTERNATIVNYJ.")) + (coding-system alternativnyj) + (native-coding-system alternativnyj) + (invalid-sequence-coding-system alternativnyj) + (coding-priority alternativnyj) + (input-method . "cyrillic-yawerty") + (features cyril-util) + (tutorial . "TUTORIAL.ru") + (sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!") + (documentation . "Support for Cyrillic ALTERNATIVNYJ.")) '("Cyrillic")) +(make-8-bit-coding-system + 'koi8-ru + '((#x80 ?\u2500) ;; BOX DRAWINGS LIGHT HORIZONTAL + (#x81 ?\u2502) ;; BOX DRAWINGS LIGHT VERTICAL + (#x82 ?\u250C) ;; BOX DRAWINGS LIGHT DOWN AND RIGHT + (#x83 ?\u2510) ;; BOX DRAWINGS LIGHT DOWN AND LEFT + (#x84 ?\u2514) ;; BOX DRAWINGS LIGHT UP AND RIGHT + (#x85 ?\u2518) ;; BOX DRAWINGS LIGHT UP AND LEFT + (#x86 ?\u251C) ;; BOX DRAWINGS LIGHT VERTICAL AND RIGHT + (#x87 ?\u2524) ;; BOX DRAWINGS LIGHT VERTICAL AND LEFT + (#x88 ?\u252C) ;; BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + (#x89 ?\u2534) ;; BOX DRAWINGS LIGHT UP AND HORIZONTAL + (#x8A ?\u253C) ;; BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + (#x8B ?\u2580) ;; UPPER HALF BLOCK + (#x8C ?\u2584) ;; LOWER HALF BLOCK + (#x8D ?\u2588) ;; FULL BLOCK + (#x8E ?\u258C) ;; LEFT HALF BLOCK + (#x8F ?\u2590) ;; RIGHT HALF BLOCK + (#x90 ?\u2591) ;; LIGHT SHADE + (#x91 ?\u2592) ;; MEDIUM SHADE + (#x92 ?\u2593) ;; DARK SHADE + (#x93 ?\u2320) ;; TOP HALF INTEGRAL + (#x94 ?\u25A0) ;; BLACK SQUARE + (#x95 ?\u2219) ;; BULLET OPERATOR + (#x96 ?\u221A) ;; SQUARE ROOT + (#x97 ?\u2248) ;; ALMOST EQUAL TO + (#x98 ?\u2264) ;; LESS-THAN OR EQUAL TO + (#x99 ?\u2265) ;; GREATER-THAN OR EQUAL TO + (#x9A ?\u00A0) ;; NO-BREAK SPACE + (#x9B ?\u2321) ;; BOTTOM HALF INTEGRAL + (#x9C ?\u00B0) ;; DEGREE SIGN + (#x9D ?\u00B2) ;; SUPERSCRIPT TWO + (#x9E ?\u00B7) ;; MIDDLE DOT + (#x9F ?\u00F7) ;; DIVISION SIGN + (#xA0 ?\u2550) ;; BOX DRAWINGS DOUBLE HORIZONTAL + (#xA1 ?\u2551) ;; BOX DRAWINGS DOUBLE VERTICAL + (#xA2 ?\u2552) ;; BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xA5 ?\u2554) ;; BOX DRAWINGS DOUBLE DOWN AND RIGHT + (#xA6 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xA7 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xA8 ?\u2557) ;; BOX DRAWINGS DOUBLE DOWN AND LEFT + (#xA9 ?\u2558) ;; BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + (#xAA ?\u2559) ;; BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + (#xAB ?\u255A) ;; BOX DRAWINGS DOUBLE UP AND RIGHT + (#xAC ?\u255B) ;; BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + (#xAD ?\u0491) ;; CYRILLIC SMALL LETTER GHE WITH UPTURN + (#xAE ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xAF ?\u255E) ;; BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + (#xB0 ?\u255F) ;; BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + (#xB1 ?\u2560) ;; BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + (#xB2 ?\u2561) ;; BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB4 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xB5 ?\u2563) ;; BOX DRAWINGS DOUBLE VERTICAL AND LEFT + (#xB6 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB7 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xB8 ?\u2566) ;; BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + (#xB9 ?\u2567) ;; BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + (#xBA ?\u2568) ;; BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + (#xBB ?\u2569) ;; BOX DRAWINGS DOUBLE UP AND HORIZONTAL + (#xBC ?\u256A) ;; BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + (#xBD ?\u0490) ;; CYRILLIC CAPITAL LETTER GHE WITH UPTURN + (#xBE ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xBF ?\u00A9) ;; COPYRIGHT SIGN + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN + "KOI8-RU, a mostly-compatible superset of KOI8-R. +Also known as Windows code page 21866; has Ukrainian and Belarussian support. " + '(mnemonic ",L@C(B" + aliases (cp21866))) + +;; We should provide an input method and the corresponding language +;; environments for the next three coding systems. + +(make-8-bit-coding-system + 'koi8-t + '((#x80 ?\u049B) ;; CYRILLIC SMALL LETTER KA WITH DESCENDER + (#x81 ?\u0493) ;; CYRILLIC SMALL LETTER GHE WITH STROKE + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0492) ;; CYRILLIC CAPITAL LETTER GHE WITH STROKE + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u04B3) ;; CYRILLIC SMALL LETTER HA WITH DESCENDER + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u04B2) ;; CYRILLIC CAPITAL LETTER HA WITH DESCENDER + (#x8D ?\u04B7) ;; CYRILLIC SMALL LETTER CHE WITH DESCENDER + (#x8E ?\u04B6) ;; CYRILLIC CAPITAL LETTER CHE WITH DESCENDER + (#x90 ?\u049A) ;; CYRILLIC CAPITAL LETTER KA WITH DESCENDER + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#xA1 ?\u04EF) ;; CYRILLIC SMALL LETTER U WITH MACRON + (#xA2 ?\u04EE) ;; CYRILLIC CAPITAL LETTER U WITH MACRON + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u04E3) ;; CYRILLIC SMALL LETTER I WITH MACRON + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u00B2) ;; SUPERSCRIPT TWO + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB5 ?\u04E2) ;; CYRILLIC CAPITAL LETTER I WITH MACRON + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB9 ?\u2116) ;; NUMERO SIGN + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBF ?\u00A9) ;; COPYRIGHT SIGN + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN + ",L:>8(B-8 for Tajik." + '(mnemonic ",LB%GÒ¶%@(B" + documentation + "Compatible in the alphabetic characters with KOI-8R for Russian, +this 8-bit Cyrillic coding system makes those characters available +that are necessary for writing Tajik, (,LWPQ^]%GÓ£%@(B ,Lb^%GÒ·%@XZ%GÓ£%@(B) the main +language of Tajikistan and a close relative of Persian. ")) + +;; Case support, for the new characters. +(loop + for (upper lower) + in '((?\u04B6 ?\u04B7) ;; CHE WITH DESCENDER + (?\u0492 ?\u0493) ;; GHE WITH STROKE + (?\u04B2 ?\u04B3) ;; HA WITH DESCENDER + (?\u04E2 ?\u04E3) ;; I WITH MACRON + (?\u049A ?\u049B) ;; KA WITH DESCENDER + (?\u04EE ?\u04EF)) ;; U WITH MACRON + with case-table = (standard-case-table) + do + (put-case-table-pair upper lower case-table)) + +;; Support fot the languages of the Caucasus. +(make-8-bit-coding-system + 'koi8-c + '((#x80 ?\u0493) ;; CYRILLIC SMALL LETTER GHE WITH STROKE + (#x81 ?\u0497) ;; CYRILLIC SMALL LETTER ZHE WITH DESCENDER + (#x82 ?\u049B) ;; CYRILLIC SMALL LETTER KA WITH DESCENDER + (#x83 ?\u049D) ;; CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE + (#x84 ?\u04A3) ;; CYRILLIC SMALL LETTER EN WITH DESCENDER + (#x85 ?\u04AF) ;; CYRILLIC SMALL LETTER STRAIGHT U + (#x86 ?\u04B1) ;; CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE + (#x87 ?\u04B3) ;; CYRILLIC SMALL LETTER HA WITH DESCENDER + (#x88 ?\u04B7) ;; CYRILLIC SMALL LETTER CHE WITH DESCENDER + (#x89 ?\u04B9) ;; CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE + (#x8A ?\u04BB) ;; CYRILLIC SMALL LETTER SHHA + (#x8B ?\u2580) ;; UPPER HALF BLOCK + (#x8C ?\u049D) ;; CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE + (#x8D ?\u04E3) ;; CYRILLIC SMALL LETTER I WITH MACRON + (#x8E ?\u04E9) ;; CYRILLIC SMALL LETTER BARRED O + (#x8F ?\u04EF) ;; CYRILLIC SMALL LETTER U WITH MACRON + (#x90 ?\u0492) ;; CYRILLIC CAPITAL LETTER GHE WITH STROKE + (#x91 ?\u0496) ;; CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER + (#x92 ?\u049A) ;; CYRILLIC CAPITAL LETTER KA WITH DESCENDER + (#x93 ?\u049C) ;; CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE + (#x94 ?\u04A2) ;; CYRILLIC CAPITAL LETTER EN WITH DESCENDER + (#x95 ?\u04AE) ;; CYRILLIC CAPITAL LETTER STRAIGHT U + (#x96 ?\u04B0) ;; CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE + (#x97 ?\u04B2) ;; CYRILLIC CAPITAL LETTER HA WITH DESCENDER + (#x98 ?\u04B6) ;; CYRILLIC CAPITAL LETTER CHE WITH DESCENDER + (#x99 ?\u04B8) ;; CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE + (#x9A ?\u04BA) ;; CYRILLIC CAPITAL LETTER SHHA + (#x9B ?\u2321) ;; BOTTOM HALF INTEGRAL + (#x9C ?\u04D8) ;; CYRILLIC CAPITAL LETTER SCHWA + (#x9D ?\u04E2) ;; CYRILLIC CAPITAL LETTER I WITH MACRON + (#x9E ?\u04E8) ;; CYRILLIC CAPITAL LETTER BARRED O + (#x9F ?\u04EE) ;; CYRILLIC CAPITAL LETTER U WITH MACRON + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u0452) ;; CYRILLIC SMALL LETTER DJE + (#xA2 ?\u0453) ;; CYRILLIC SMALL LETTER GJE + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xA5 ?\u0455) ;; CYRILLIC SMALL LETTER DZE + (#xA6 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xA7 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xA8 ?\u0458) ;; CYRILLIC SMALL LETTER JE + (#xA9 ?\u0459) ;; CYRILLIC SMALL LETTER LJE + (#xAA ?\u045A) ;; CYRILLIC SMALL LETTER NJE + (#xAB ?\u045B) ;; CYRILLIC SMALL LETTER TSHE + (#xAC ?\u045C) ;; CYRILLIC SMALL LETTER KJE + (#xAD ?\u0491) ;; CYRILLIC SMALL LETTER GHE WITH UPTURN + (#xAE ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xAF ?\u045F) ;; CYRILLIC SMALL LETTER DZHE + (#xB0 ?\u2116) ;; NUMERO SIGN + (#xB1 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE + (#xB2 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB4 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xB5 ?\u0405) ;; CYRILLIC CAPITAL LETTER DZE + (#xB6 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB7 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xB8 ?\u0408) ;; CYRILLIC CAPITAL LETTER JE + (#xB9 ?\u0409) ;; CYRILLIC CAPITAL LETTER LJE + (#xBA ?\u040A) ;; CYRILLIC CAPITAL LETTER NJE + (#xBB ?\u040B) ;; CYRILLIC CAPITAL LETTER TSHE + (#xBC ?\u040C) ;; CYRILLIC CAPITAL LETTER KJE + (#xBD ?\u0490) ;; CYRILLIC CAPITAL LETTER GHE WITH UPTURN + (#xBE ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xBF ?\u040F) ;; CYRILLIC CAPITAL LETTER DZHE + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN + "KOI-8 for the Caucasus." + '(documentation + "Note that this does not support old Russian orthography; +for that, see koi8-o. ")) + +(loop + for (upper lower) + in '((?\u04E9 ?\u04E8) ;; BARRED O + (?\u04B9 ?\u04B8) ;; CHE WITH VERTICAL STROKE + (?\u0452 ?\u0402) ;; DJE + (?\u0455 ?\u0405) ;; DZE + (?\u04A3 ?\u04A2) ;; EN WITH DESCENDER + (?\u049D ?\u049C) ;; KA WITH VERTICAL STROKE + (?\u04BB ?\u04BA) ;; SHHA + (?\u04AF ?\u04AE) ;; STRAIGHT U + (?\u04B1 ?\u04B0) ;; STRAIGHT U WITH STROKE + (?\u0497 ?\u0496)) ;; ZHE WITH DESCENDER + with case-table = (standard-case-table) + do + (put-case-table-pair upper lower case-table)) + +;; Archaic Russian support. +(make-8-bit-coding-system + 'koi8-o + '((#x80 ?\u0402) ;; CYRILLIC CAPITAL LETTER DJE + (#x81 ?\u0403) ;; CYRILLIC CAPITAL LETTER GJE + (#x82 ?\u00B8) ;; CEDILLA + (#x83 ?\u0453) ;; CYRILLIC SMALL LETTER GJE + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u00A7) ;; SECTION SIGN + (#x88 ?\u20AC) ;; EURO SIGN + (#x89 ?\u00A8) ;; DIAERESIS + (#x8A ?\u0409) ;; CYRILLIC CAPITAL LETTER LJE + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u040A) ;; CYRILLIC CAPITAL LETTER NJE + (#x8D ?\u040C) ;; CYRILLIC CAPITAL LETTER KJE + (#x8E ?\u040B) ;; CYRILLIC CAPITAL LETTER TSHE + (#x8F ?\u040F) ;; CYRILLIC CAPITAL LETTER DZHE + (#x90 ?\u0452) ;; CYRILLIC SMALL LETTER DJE + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x98 ?\u00A3) ;; POUND SIGN + (#x99 ?\u00B7) ;; MIDDLE DOT + (#x9A ?\u0459) ;; CYRILLIC SMALL LETTER LJE + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u045A) ;; CYRILLIC SMALL LETTER NJE + (#x9D ?\u045C) ;; CYRILLIC SMALL LETTER KJE + (#x9E ?\u045B) ;; CYRILLIC SMALL LETTER TSHE + (#x9F ?\u045F) ;; CYRILLIC SMALL LETTER DZHE + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u0475) ;; CYRILLIC SMALL LETTER IZHITSA + (#xA2 ?\u0463) ;; CYRILLIC SMALL LETTER YAT + (#xA3 ?\u0451) ;; CYRILLIC SMALL LETTER IO + (#xA4 ?\u0454) ;; CYRILLIC SMALL LETTER UKRAINIAN IE + (#xA5 ?\u0455) ;; CYRILLIC SMALL LETTER DZE + (#xA6 ?\u0456) ;; CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + (#xA7 ?\u0457) ;; CYRILLIC SMALL LETTER YI + (#xA8 ?\u0458) ;; CYRILLIC SMALL LETTER JE + (#xA9 ?\u00AE) ;; REGISTERED SIGN + (#xAA ?\u2122) ;; TRADE MARK SIGN + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u0473) ;; CYRILLIC SMALL LETTER FITA + (#xAD ?\u0491) ;; CYRILLIC SMALL LETTER GHE WITH UPTURN + (#xAE ?\u045E) ;; CYRILLIC SMALL LETTER SHORT U + (#xAF ?\u00B4) ;; ACUTE ACCENT + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u0474) ;; CYRILLIC CAPITAL LETTER IZHITSA + (#xB2 ?\u0462) ;; CYRILLIC CAPITAL LETTER YAT + (#xB3 ?\u0401) ;; CYRILLIC CAPITAL LETTER IO + (#xB4 ?\u0404) ;; CYRILLIC CAPITAL LETTER UKRAINIAN IE + (#xB5 ?\u0405) ;; CYRILLIC CAPITAL LETTER DZE + (#xB6 ?\u0406) ;; CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + (#xB7 ?\u0407) ;; CYRILLIC CAPITAL LETTER YI + (#xB8 ?\u0408) ;; CYRILLIC CAPITAL LETTER JE + (#xB9 ?\u2116) ;; NUMERO SIGN + (#xBA ?\u00A2) ;; CENT SIGN + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u0472) ;; CYRILLIC CAPITAL LETTER FITA + (#xBD ?\u0490) ;; CYRILLIC CAPITAL LETTER GHE WITH UPTURN + (#xBE ?\u040E) ;; CYRILLIC CAPITAL LETTER SHORT U + (#xBF ?\u00A9) ;; COPYRIGHT SIGN + (#xC0 ?\u044E) ;; CYRILLIC SMALL LETTER YU + (#xC1 ?\u0430) ;; CYRILLIC SMALL LETTER A + (#xC2 ?\u0431) ;; CYRILLIC SMALL LETTER BE + (#xC3 ?\u0446) ;; CYRILLIC SMALL LETTER TSE + (#xC4 ?\u0434) ;; CYRILLIC SMALL LETTER DE + (#xC5 ?\u0435) ;; CYRILLIC SMALL LETTER IE + (#xC6 ?\u0444) ;; CYRILLIC SMALL LETTER EF + (#xC7 ?\u0433) ;; CYRILLIC SMALL LETTER GHE + (#xC8 ?\u0445) ;; CYRILLIC SMALL LETTER HA + (#xC9 ?\u0438) ;; CYRILLIC SMALL LETTER I + (#xCA ?\u0439) ;; CYRILLIC SMALL LETTER SHORT I + (#xCB ?\u043A) ;; CYRILLIC SMALL LETTER KA + (#xCC ?\u043B) ;; CYRILLIC SMALL LETTER EL + (#xCD ?\u043C) ;; CYRILLIC SMALL LETTER EM + (#xCE ?\u043D) ;; CYRILLIC SMALL LETTER EN + (#xCF ?\u043E) ;; CYRILLIC SMALL LETTER O + (#xD0 ?\u043F) ;; CYRILLIC SMALL LETTER PE + (#xD1 ?\u044F) ;; CYRILLIC SMALL LETTER YA + (#xD2 ?\u0440) ;; CYRILLIC SMALL LETTER ER + (#xD3 ?\u0441) ;; CYRILLIC SMALL LETTER ES + (#xD4 ?\u0442) ;; CYRILLIC SMALL LETTER TE + (#xD5 ?\u0443) ;; CYRILLIC SMALL LETTER U + (#xD6 ?\u0436) ;; CYRILLIC SMALL LETTER ZHE + (#xD7 ?\u0432) ;; CYRILLIC SMALL LETTER VE + (#xD8 ?\u044C) ;; CYRILLIC SMALL LETTER SOFT SIGN + (#xD9 ?\u044B) ;; CYRILLIC SMALL LETTER YERU + (#xDA ?\u0437) ;; CYRILLIC SMALL LETTER ZE + (#xDB ?\u0448) ;; CYRILLIC SMALL LETTER SHA + (#xDC ?\u044D) ;; CYRILLIC SMALL LETTER E + (#xDD ?\u0449) ;; CYRILLIC SMALL LETTER SHCHA + (#xDE ?\u0447) ;; CYRILLIC SMALL LETTER CHE + (#xDF ?\u044A) ;; CYRILLIC SMALL LETTER HARD SIGN + (#xE0 ?\u042E) ;; CYRILLIC CAPITAL LETTER YU + (#xE1 ?\u0410) ;; CYRILLIC CAPITAL LETTER A + (#xE2 ?\u0411) ;; CYRILLIC CAPITAL LETTER BE + (#xE3 ?\u0426) ;; CYRILLIC CAPITAL LETTER TSE + (#xE4 ?\u0414) ;; CYRILLIC CAPITAL LETTER DE + (#xE5 ?\u0415) ;; CYRILLIC CAPITAL LETTER IE + (#xE6 ?\u0424) ;; CYRILLIC CAPITAL LETTER EF + (#xE7 ?\u0413) ;; CYRILLIC CAPITAL LETTER GHE + (#xE8 ?\u0425) ;; CYRILLIC CAPITAL LETTER HA + (#xE9 ?\u0418) ;; CYRILLIC CAPITAL LETTER I + (#xEA ?\u0419) ;; CYRILLIC CAPITAL LETTER SHORT I + (#xEB ?\u041A) ;; CYRILLIC CAPITAL LETTER KA + (#xEC ?\u041B) ;; CYRILLIC CAPITAL LETTER EL + (#xED ?\u041C) ;; CYRILLIC CAPITAL LETTER EM + (#xEE ?\u041D) ;; CYRILLIC CAPITAL LETTER EN + (#xEF ?\u041E) ;; CYRILLIC CAPITAL LETTER O + (#xF0 ?\u041F) ;; CYRILLIC CAPITAL LETTER PE + (#xF1 ?\u042F) ;; CYRILLIC CAPITAL LETTER YA + (#xF2 ?\u0420) ;; CYRILLIC CAPITAL LETTER ER + (#xF3 ?\u0421) ;; CYRILLIC CAPITAL LETTER ES + (#xF4 ?\u0422) ;; CYRILLIC CAPITAL LETTER TE + (#xF5 ?\u0423) ;; CYRILLIC CAPITAL LETTER U + (#xF6 ?\u0416) ;; CYRILLIC CAPITAL LETTER ZHE + (#xF7 ?\u0412) ;; CYRILLIC CAPITAL LETTER VE + (#xF8 ?\u042C) ;; CYRILLIC CAPITAL LETTER SOFT SIGN + (#xF9 ?\u042B) ;; CYRILLIC CAPITAL LETTER YERU + (#xFA ?\u0417) ;; CYRILLIC CAPITAL LETTER ZE + (#xFB ?\u0428) ;; CYRILLIC CAPITAL LETTER SHA + (#xFC ?\u042D) ;; CYRILLIC CAPITAL LETTER E + (#xFD ?\u0429) ;; CYRILLIC CAPITAL LETTER SHCHA + (#xFE ?\u0427) ;; CYRILLIC CAPITAL LETTER CHE + (#xFF ?\u042A));; CYRILLIC CAPITAL LETTER HARD SIGN + "KOI-8 for old-orthography Russian; also known as KOI-C." + '(mnemonic ",L:>(B" + documentation + "KOI-8 for old-orthography Russian; also known as KOI-C. + +This is mostly compatible with KOI8-R in the alphabetic characters, and +provides ,L&v(B, %GѲѳ%@, %GѢѣ%@, and %GѴѵ%@ instead of some of the box-drawing characters. ")) + +(loop + for (upper lower) + in '((?\u0472 ?\u0473) ;; FITA + (?\u0474 ?\u0475) ;; IZHITSA + (?\u0408 ?\u0458) ;; JE + (?\u0462 ?\u0463)) ;; YAT + with case-table = (standard-case-table) + do + (put-case-table-pair upper lower case-table)) + +(provide 'cyrillic) + ;;; cyrillic.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/devan-util.el --- a/lisp/mule/devan-util.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/devan-util.el Sat Oct 25 21:40:46 2008 +0900 @@ -1057,7 +1057,7 @@ (setq ordered-glyphs (append ordered-glyphs (list (assq glyph devanagari-composition-rules)))))) - (sort ordered-glyphs '(lambda (x y) (< (car (cdr x)) (car (cdr y))))))) + (sort ordered-glyphs #'(lambda (x y) (< (car (cdr x)) (car (cdr y))))))) ;;(devanagari-compose-to-one-glyph "$(5"5!X![(B") => "4$(6!Xv#"5t%![0!X"5![1(B" diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/english.el --- a/lisp/mule/english.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/english.el Sat Oct 25 21:40:46 2008 +0900 @@ -31,21 +31,6 @@ ;;; Code -;; ASCII with right-to-left direction. -(make-charset 'ascii-right-to-left - "ASCII (left half of ISO 8859-1) with right-to-left direction" - '(dimension - 1 - registries ["ISO8859-1"] - chars 94 - columns 1 - direction r2l - final ?B - graphic 0 - short-name "rev ASCII" - long-name "ASCII with right-to-left direction" - )) - (set-language-info-alist "English" '((tutorial . "TUTORIAL") (locale "en" "C") diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/ethio-util.el --- a/lisp/mule/ethio-util.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/ethio-util.el Sat Oct 25 21:40:46 2008 +0900 @@ -1056,10 +1056,10 @@ (aset ethio-fidel-to-sera-map 463 "?")) (mapcar - '(lambda (x) - (aset (aref ethio-fidel-to-sera-map x) - 2 - (if ethio-W-sixth-always ?' ?u))) + #'(lambda (x) + (aset (aref ethio-fidel-to-sera-map x) + 2 + (if ethio-W-sixth-always ?' ?u))) '(77 93 141 181 197 277 440 441 442 443 444 457)) (if (ethio-prefer-amharic-p) diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/ethiopic.el --- a/lisp/mule/ethiopic.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/ethiopic.el Sat Oct 25 21:40:46 2008 +0900 @@ -61,15 +61,13 @@ (r1 *= 94) (r2 += r1) (if (r2 < 256) - (r1 = ?\x12) + (r1 = #x12) (if (r2 < 448) - ((r1 = ?\x13) (r2 -= 256)) - ((r1 = ?\xfd) (r2 -= 208)) + ((r1 = #x13) (r2 -= 256)) + ((r1 = #xfd) (r2 -= 208)) )))) "CCL program to encode an Ethiopic code to code point of Ethiopic font.") -;; (setq font-ccl-encoder-alist -;; (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist)) (set-charset-ccl-program 'ethiopic 'ccl-encode-ethio-font) (set-language-info-alist diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/general-late.el --- a/lisp/mule/general-late.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/general-late.el Sat Oct 25 21:40:46 2008 +0900 @@ -29,15 +29,19 @@ ;; the language-specific code a chance to create its coding systems. (setq posix-charset-to-coding-system-hash - (eval-when-compile - (let ((res (make-hash-table :test 'equal))) - (dolist (coding-system (coding-system-list) res) - (setq coding-system - (symbol-name (coding-system-name coding-system))) - (unless (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system) - (puthash - (replace-in-string (downcase coding-system) "[^a-z0-9]" "") - (intern coding-system) res))))) + (loop + ;; We want both normal and internal coding systems in order + ;; to pick up coding system aliases. + for coding-system in (coding-system-list 'every) + with res = (make-hash-table :test #'equal) + do + (setq coding-system (symbol-name coding-system)) + (unless (or (string-match #r"\(-unix\|-mac\|-dos\)$" coding-system) + (string-match #r"^\(internal\|mswindows\)" coding-system)) + (puthash + (replace-in-string (downcase coding-system) "[^a-z0-9]" "") + (coding-system-name (intern coding-system)) res)) + finally return res) ;; In a thoughtless act of cultural imperialism, move English, German ;; and Japanese to the front of language-info-alist to make start-up a @@ -50,7 +54,16 @@ (remassoc "German" language-info-alist)) language-info-alist (cons (assoc "English" language-info-alist) - (remassoc "English" language-info-alist))) + (remassoc "English" language-info-alist)) + + ;; Make Installation-string actually reflect the environment at + ;; byte-compile time. (We can't necessarily decode it when version.el + ;; is loaded, since not all the coding systems are available then.) + Installation-string (if-boundp 'Installation-file-coding-system + (decode-coding-string + Installation-string + Installation-file-coding-system) + Installation-string)) ;; At this point in the dump, all the charsets have been loaded. Now, load ;; their Unicode mappings. @@ -58,4 +71,4 @@ (let ((data-directory (expand-file-name "etc" source-directory))) (load-unicode-tables))) -;;; general-late.el ends here \ No newline at end of file +;;; general-late.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/greek.el --- a/lisp/mule/greek.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/greek.el Sat Oct 25 21:40:46 2008 +0900 @@ -118,22 +118,222 @@ (string (char-syntax (make-char 'latin-iso8859-1 latin-1))) syntax-table)) -(make-coding-system - 'iso-8859-7 'iso2022 "ISO-8859-7 (Greek)" - '(charset-g0 ascii - charset-g1 greek-iso8859-7 - charset-g2 t - charset-g3 t - mnemonic "Grk")) +(make-8-bit-coding-system + 'iso-8859-7 + '((#xA1 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#xA2 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#xA4 ?\u20AC) ;; EURO SIGN + (#xA5 ?\u20AF) ;; DRACHMA SIGN + (#xAA ?\u037A) ;; GREEK YPOGEGRAMMENI + (#xAF ?\u2015) ;; HORIZONTAL BAR + (#xB4 ?\u0384) ;; GREEK TONOS + (#xB5 ?\u0385) ;; GREEK DIALYTIKA TONOS + (#xB6 ?\u0386) ;; GREEK CAPITAL LETTER ALPHA WITH TONOS + (#xB8 ?\u0388) ;; GREEK CAPITAL LETTER EPSILON WITH TONOS + (#xB9 ?\u0389) ;; GREEK CAPITAL LETTER ETA WITH TONOS + (#xBA ?\u038A) ;; GREEK CAPITAL LETTER IOTA WITH TONOS + (#xBC ?\u038C) ;; GREEK CAPITAL LETTER OMICRON WITH TONOS + (#xBE ?\u038E) ;; GREEK CAPITAL LETTER UPSILON WITH TONOS + (#xBF ?\u038F) ;; GREEK CAPITAL LETTER OMEGA WITH TONOS + (#xC0 ?\u0390) ;; GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS + (#xC1 ?\u0391) ;; GREEK CAPITAL LETTER ALPHA + (#xC2 ?\u0392) ;; GREEK CAPITAL LETTER BETA + (#xC3 ?\u0393) ;; GREEK CAPITAL LETTER GAMMA + (#xC4 ?\u0394) ;; GREEK CAPITAL LETTER DELTA + (#xC5 ?\u0395) ;; GREEK CAPITAL LETTER EPSILON + (#xC6 ?\u0396) ;; GREEK CAPITAL LETTER ZETA + (#xC7 ?\u0397) ;; GREEK CAPITAL LETTER ETA + (#xC8 ?\u0398) ;; GREEK CAPITAL LETTER THETA + (#xC9 ?\u0399) ;; GREEK CAPITAL LETTER IOTA + (#xCA ?\u039A) ;; GREEK CAPITAL LETTER KAPPA + (#xCB ?\u039B) ;; GREEK CAPITAL LETTER LAMDA + (#xCC ?\u039C) ;; GREEK CAPITAL LETTER MU + (#xCD ?\u039D) ;; GREEK CAPITAL LETTER NU + (#xCE ?\u039E) ;; GREEK CAPITAL LETTER XI + (#xCF ?\u039F) ;; GREEK CAPITAL LETTER OMICRON + (#xD0 ?\u03A0) ;; GREEK CAPITAL LETTER PI + (#xD1 ?\u03A1) ;; GREEK CAPITAL LETTER RHO + (#xD3 ?\u03A3) ;; GREEK CAPITAL LETTER SIGMA + (#xD4 ?\u03A4) ;; GREEK CAPITAL LETTER TAU + (#xD5 ?\u03A5) ;; GREEK CAPITAL LETTER UPSILON + (#xD6 ?\u03A6) ;; GREEK CAPITAL LETTER PHI + (#xD7 ?\u03A7) ;; GREEK CAPITAL LETTER CHI + (#xD8 ?\u03A8) ;; GREEK CAPITAL LETTER PSI + (#xD9 ?\u03A9) ;; GREEK CAPITAL LETTER OMEGA + (#xDA ?\u03AA) ;; GREEK CAPITAL LETTER IOTA WITH DIALYTIKA + (#xDB ?\u03AB) ;; GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA + (#xDC ?\u03AC) ;; GREEK SMALL LETTER ALPHA WITH TONOS + (#xDD ?\u03AD) ;; GREEK SMALL LETTER EPSILON WITH TONOS + (#xDE ?\u03AE) ;; GREEK SMALL LETTER ETA WITH TONOS + (#xDF ?\u03AF) ;; GREEK SMALL LETTER IOTA WITH TONOS + (#xE0 ?\u03B0) ;; GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS + (#xE1 ?\u03B1) ;; GREEK SMALL LETTER ALPHA + (#xE2 ?\u03B2) ;; GREEK SMALL LETTER BETA + (#xE3 ?\u03B3) ;; GREEK SMALL LETTER GAMMA + (#xE4 ?\u03B4) ;; GREEK SMALL LETTER DELTA + (#xE5 ?\u03B5) ;; GREEK SMALL LETTER EPSILON + (#xE6 ?\u03B6) ;; GREEK SMALL LETTER ZETA + (#xE7 ?\u03B7) ;; GREEK SMALL LETTER ETA + (#xE8 ?\u03B8) ;; GREEK SMALL LETTER THETA + (#xE9 ?\u03B9) ;; GREEK SMALL LETTER IOTA + (#xEA ?\u03BA) ;; GREEK SMALL LETTER KAPPA + (#xEB ?\u03BB) ;; GREEK SMALL LETTER LAMDA + (#xEC ?\u03BC) ;; GREEK SMALL LETTER MU + (#xED ?\u03BD) ;; GREEK SMALL LETTER NU + (#xEE ?\u03BE) ;; GREEK SMALL LETTER XI + (#xEF ?\u03BF) ;; GREEK SMALL LETTER OMICRON + (#xF0 ?\u03C0) ;; GREEK SMALL LETTER PI + (#xF1 ?\u03C1) ;; GREEK SMALL LETTER RHO + (#xF2 ?\u03C2) ;; GREEK SMALL LETTER FINAL SIGMA + (#xF3 ?\u03C3) ;; GREEK SMALL LETTER SIGMA + (#xF4 ?\u03C4) ;; GREEK SMALL LETTER TAU + (#xF5 ?\u03C5) ;; GREEK SMALL LETTER UPSILON + (#xF6 ?\u03C6) ;; GREEK SMALL LETTER PHI + (#xF7 ?\u03C7) ;; GREEK SMALL LETTER CHI + (#xF8 ?\u03C8) ;; GREEK SMALL LETTER PSI + (#xF9 ?\u03C9) ;; GREEK SMALL LETTER OMEGA + (#xFA ?\u03CA) ;; GREEK SMALL LETTER IOTA WITH DIALYTIKA + (#xFB ?\u03CB) ;; GREEK SMALL LETTER UPSILON WITH DIALYTIKA + (#xFC ?\u03CC) ;; GREEK SMALL LETTER OMICRON WITH TONOS + (#xFD ?\u03CD) ;; GREEK SMALL LETTER UPSILON WITH TONOS + (#xFE ?\u03CE)) ;; GREEK SMALL LETTER OMEGA WITH TONOS + "ISO-8859-7 (Greek)" + '(mnemonic "Grk" + aliases (greek-iso-8bit))) + +(make-8-bit-coding-system + 'windows-1253 + '((#x80 ?\u20AC) ;; EURO SIGN + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0192) ;; LATIN SMALL LETTER F WITH HOOK + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u0385) ;; GREEK DIALYTIKA TONOS + (#xA2 ?\u0386) ;; GREEK CAPITAL LETTER ALPHA WITH TONOS + (#xA3 ?\u00A3) ;; POUND SIGN + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u00A5) ;; YEN SIGN + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xA8 ?\u00A8) ;; DIAERESIS + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xAF ?\u2015) ;; HORIZONTAL BAR + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u00B2) ;; SUPERSCRIPT TWO + (#xB3 ?\u00B3) ;; SUPERSCRIPT THREE + (#xB4 ?\u0384) ;; GREEK TONOS + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB8 ?\u0388) ;; GREEK CAPITAL LETTER EPSILON WITH TONOS + (#xB9 ?\u0389) ;; GREEK CAPITAL LETTER ETA WITH TONOS + (#xBA ?\u038A) ;; GREEK CAPITAL LETTER IOTA WITH TONOS + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u038C) ;; GREEK CAPITAL LETTER OMICRON WITH TONOS + (#xBD ?\u00BD) ;; VULGAR FRACTION ONE HALF + (#xBE ?\u038E) ;; GREEK CAPITAL LETTER UPSILON WITH TONOS + (#xBF ?\u038F) ;; GREEK CAPITAL LETTER OMEGA WITH TONOS + (#xC0 ?\u0390) ;; GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS + (#xC1 ?\u0391) ;; GREEK CAPITAL LETTER ALPHA + (#xC2 ?\u0392) ;; GREEK CAPITAL LETTER BETA + (#xC3 ?\u0393) ;; GREEK CAPITAL LETTER GAMMA + (#xC4 ?\u0394) ;; GREEK CAPITAL LETTER DELTA + (#xC5 ?\u0395) ;; GREEK CAPITAL LETTER EPSILON + (#xC6 ?\u0396) ;; GREEK CAPITAL LETTER ZETA + (#xC7 ?\u0397) ;; GREEK CAPITAL LETTER ETA + (#xC8 ?\u0398) ;; GREEK CAPITAL LETTER THETA + (#xC9 ?\u0399) ;; GREEK CAPITAL LETTER IOTA + (#xCA ?\u039A) ;; GREEK CAPITAL LETTER KAPPA + (#xCB ?\u039B) ;; GREEK CAPITAL LETTER LAMDA + (#xCC ?\u039C) ;; GREEK CAPITAL LETTER MU + (#xCD ?\u039D) ;; GREEK CAPITAL LETTER NU + (#xCE ?\u039E) ;; GREEK CAPITAL LETTER XI + (#xCF ?\u039F) ;; GREEK CAPITAL LETTER OMICRON + (#xD0 ?\u03A0) ;; GREEK CAPITAL LETTER PI + (#xD1 ?\u03A1) ;; GREEK CAPITAL LETTER RHO + (#xD3 ?\u03A3) ;; GREEK CAPITAL LETTER SIGMA + (#xD4 ?\u03A4) ;; GREEK CAPITAL LETTER TAU + (#xD5 ?\u03A5) ;; GREEK CAPITAL LETTER UPSILON + (#xD6 ?\u03A6) ;; GREEK CAPITAL LETTER PHI + (#xD7 ?\u03A7) ;; GREEK CAPITAL LETTER CHI + (#xD8 ?\u03A8) ;; GREEK CAPITAL LETTER PSI + (#xD9 ?\u03A9) ;; GREEK CAPITAL LETTER OMEGA + (#xDA ?\u03AA) ;; GREEK CAPITAL LETTER IOTA WITH DIALYTIKA + (#xDB ?\u03AB) ;; GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA + (#xDC ?\u03AC) ;; GREEK SMALL LETTER ALPHA WITH TONOS + (#xDD ?\u03AD) ;; GREEK SMALL LETTER EPSILON WITH TONOS + (#xDE ?\u03AE) ;; GREEK SMALL LETTER ETA WITH TONOS + (#xDF ?\u03AF) ;; GREEK SMALL LETTER IOTA WITH TONOS + (#xE0 ?\u03B0) ;; GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS + (#xE1 ?\u03B1) ;; GREEK SMALL LETTER ALPHA + (#xE2 ?\u03B2) ;; GREEK SMALL LETTER BETA + (#xE3 ?\u03B3) ;; GREEK SMALL LETTER GAMMA + (#xE4 ?\u03B4) ;; GREEK SMALL LETTER DELTA + (#xE5 ?\u03B5) ;; GREEK SMALL LETTER EPSILON + (#xE6 ?\u03B6) ;; GREEK SMALL LETTER ZETA + (#xE7 ?\u03B7) ;; GREEK SMALL LETTER ETA + (#xE8 ?\u03B8) ;; GREEK SMALL LETTER THETA + (#xE9 ?\u03B9) ;; GREEK SMALL LETTER IOTA + (#xEA ?\u03BA) ;; GREEK SMALL LETTER KAPPA + (#xEB ?\u03BB) ;; GREEK SMALL LETTER LAMDA + (#xEC ?\u03BC) ;; GREEK SMALL LETTER MU + (#xED ?\u03BD) ;; GREEK SMALL LETTER NU + (#xEE ?\u03BE) ;; GREEK SMALL LETTER XI + (#xEF ?\u03BF) ;; GREEK SMALL LETTER OMICRON + (#xF0 ?\u03C0) ;; GREEK SMALL LETTER PI + (#xF1 ?\u03C1) ;; GREEK SMALL LETTER RHO + (#xF2 ?\u03C2) ;; GREEK SMALL LETTER FINAL SIGMA + (#xF3 ?\u03C3) ;; GREEK SMALL LETTER SIGMA + (#xF4 ?\u03C4) ;; GREEK SMALL LETTER TAU + (#xF5 ?\u03C5) ;; GREEK SMALL LETTER UPSILON + (#xF6 ?\u03C6) ;; GREEK SMALL LETTER PHI + (#xF7 ?\u03C7) ;; GREEK SMALL LETTER CHI + (#xF8 ?\u03C8) ;; GREEK SMALL LETTER PSI + (#xF9 ?\u03C9) ;; GREEK SMALL LETTER OMEGA + (#xFA ?\u03CA) ;; GREEK SMALL LETTER IOTA WITH DIALYTIKA + (#xFB ?\u03CB) ;; GREEK SMALL LETTER UPSILON WITH DIALYTIKA + (#xFC ?\u03CC) ;; GREEK SMALL LETTER OMICRON WITH TONOS + (#xFD ?\u03CD) ;; GREEK SMALL LETTER UPSILON WITH TONOS + (#xFE ?\u03CE)) ;; GREEK SMALL LETTER OMEGA WITH TONOS + "Microsoft's Code Page 1253, for monotonic Greek. " + '(mnemonic "GrkW" + documentation + "This ASCII-compatible encoding is slightly incompatibile with +ISO-8859-7; it provides several widely-used punctuation marks in the C1 +ISO-2022 area, which makes it incompatbile with the latter standard, but +that latter standard is not used in Greece, " + aliases (cp1253))) (set-language-info-alist "Greek" '((charset greek-iso8859-7) (coding-system iso-8859-7) (coding-priority iso-8859-7) (native-coding-system iso-8859-7) - (locale "el_GR.iso88597" "el_GR.greek8" "el_GR" "greek" "el") + (invalid-sequence-coding-system iso-8859-7) + (locale "el") (input-method . "greek") (sample-text . "Greek (,FGkk]mija(B) ,FCei\(B ,Fsar(B") (documentation . t))) +;; Greek (WINDOWS-1253) will be generated automatically under Unix. + ;;; greek.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/hebrew.el --- a/lisp/mule/hebrew.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/hebrew.el Sat Oct 25 21:40:46 2008 +0900 @@ -48,16 +48,42 @@ (modify-syntax-entry (make-char 'hebrew-iso8859-8 32) "w") ; no-break space -(make-coding-system - 'iso-8859-8 'iso2022 +(make-8-bit-coding-system + 'iso-8859-8 + '((#xAA ?\u00D7) ;; MULTIPLICATION SIGN + (#xBA ?\u00F7) ;; DIVISION SIGN + (#xDF ?\u2017) ;; DOUBLE LOW LINE + (#xE0 ?\u05D0) ;; HEBREW LETTER ALEF + (#xE1 ?\u05D1) ;; HEBREW LETTER BET + (#xE2 ?\u05D2) ;; HEBREW LETTER GIMEL + (#xE3 ?\u05D3) ;; HEBREW LETTER DALET + (#xE4 ?\u05D4) ;; HEBREW LETTER HE + (#xE5 ?\u05D5) ;; HEBREW LETTER VAV + (#xE6 ?\u05D6) ;; HEBREW LETTER ZAYIN + (#xE7 ?\u05D7) ;; HEBREW LETTER HET + (#xE8 ?\u05D8) ;; HEBREW LETTER TET + (#xE9 ?\u05D9) ;; HEBREW LETTER YOD + (#xEA ?\u05DA) ;; HEBREW LETTER FINAL KAF + (#xEB ?\u05DB) ;; HEBREW LETTER KAF + (#xEC ?\u05DC) ;; HEBREW LETTER LAMED + (#xED ?\u05DD) ;; HEBREW LETTER FINAL MEM + (#xEE ?\u05DE) ;; HEBREW LETTER MEM + (#xEF ?\u05DF) ;; HEBREW LETTER FINAL NUN + (#xF0 ?\u05E0) ;; HEBREW LETTER NUN + (#xF1 ?\u05E1) ;; HEBREW LETTER SAMEKH + (#xF2 ?\u05E2) ;; HEBREW LETTER AYIN + (#xF3 ?\u05E3) ;; HEBREW LETTER FINAL PE + (#xF4 ?\u05E4) ;; HEBREW LETTER PE + (#xF5 ?\u05E5) ;; HEBREW LETTER FINAL TSADI + (#xF6 ?\u05E6) ;; HEBREW LETTER TSADI + (#xF7 ?\u05E7) ;; HEBREW LETTER QOF + (#xF8 ?\u05E8) ;; HEBREW LETTER RESH + (#xF9 ?\u05E9) ;; HEBREW LETTER SHIN + (#xFA ?\u05EA) ;; HEBREW LETTER TAV + (#xFD ?\u200E) ;; LEFT-TO-RIGHT MARK + (#xFE ?\u200F)) ;; RIGHT-TO-LEFT MARK "ISO-8859-8 (Hebrew)" - '(charset-g0 ascii - charset-g1 hebrew-iso8859-8 - charset-g2 t - charset-g3 t - no-iso6429 t - mnemonic "MIME/Hbrw" - )) + '(mnemonic "MIME/Hbrw")) (make-coding-system 'ctext-hebrew 'iso2022 diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/iso-with-esc.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/mule/iso-with-esc.el Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,205 @@ +;;; iso-with-esc.el -- +;;; Provision of the hateful and never widely implemented Latin, Greek and +;;; Cyrillic variable-length ISO 2022 coding systems that passed for Latin +;;; 2, Latin 10, (etc) support in XEmacs for so long. +;; +;; Copyright (C) 2006 Free Software Foundation + +;; Author: Aidan Kehoe + +;; This file is part of XEmacs. + +;; XEmacs is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Code: + +;;;###autoload +(define-coding-system-alias 'iso-latin-1-with-esc 'iso-2022-8) + +;;;###autoload +(make-coding-system + 'iso-latin-2-with-esc 'iso2022 "ISO-8859-2 (Latin-2)" + '(charset-g0 ascii + charset-g1 latin-iso8859-2 + charset-g2 t + charset-g3 t + mnemonic "MIME/Ltn-2")) + +;;;###autoload +(make-coding-system + 'iso-latin-3-with-esc 'iso2022 "ISO-8859-3 (Latin-3)" + '(charset-g0 ascii + charset-g1 latin-iso8859-3 + charset-g2 t + charset-g3 t + mnemonic "MIME/Ltn-3")) + +;;;###autoload +(make-coding-system + 'iso-latin-4-with-esc 'iso2022 "ISO-8859-4 (Latin-4)" + '(charset-g0 ascii + charset-g1 latin-iso8859-4 + charset-g2 t + charset-g3 t + mnemonic "MIME/Ltn-4")) + +;;;###autoload +(make-coding-system + 'iso-latin-9-with-esc 'iso2022 + "ISO 4873 conforming 8-bit code (ASCII + Latin 9; aka Latin-1 with Euro)" + '(mnemonic "MIME/Ltn-9" ; bletch + eol-type nil + charset-g0 ascii + charset-g1 latin-iso8859-15 + charset-g2 t + charset-g3 t)) + +;;;###autoload +(make-coding-system + 'iso-latin-5-with-esc 'iso2022 "ISO-8859-9 (Latin-5)" + '(charset-g0 ascii + charset-g1 latin-iso8859-9 + charset-g2 t + charset-g3 t + mnemonic "MIME/Ltn-5")) + +;;;###autoload +(make-coding-system + 'cyrillic-iso-8bit-with-esc 'iso2022 + "ISO-8859-5 (Cyrillic)" + '(charset-g0 ascii + charset-g1 cyrillic-iso8859-5 + charset-g2 t + charset-g3 t + mnemonic "ISO8/Cyr")) + +;;;###autoload +(make-coding-system + 'hebrew-iso-8bit-with-esc 'iso2022 + "ISO-8859-8 (Hebrew)" + '(charset-g0 ascii + charset-g1 hebrew-iso8859-8 + charset-g2 t + charset-g3 t + no-iso6429 t + mnemonic "MIME/Hbrw")) + +;;;###autoload +(make-coding-system + 'greek-iso-8bit-with-esc 'iso2022 "MIME ISO-8859-7" + '(charset-g0 ascii + charset-g1 greek-iso8859-7 + charset-g2 t + charset-g3 t + mnemonic "Grk")) + +;; ISO 8859-6 is such a useless character set that it seems a waste of +;; codespace to dump it. Let me count the ways: +;; +;; 1. It doesn't support Persian or Urdu, let alone Sinhalese, despite +;; plenty of unallocated code points. +;; +;; 2. It doesn't encode all the vowel diacritics (the Harakaat) despite that +;; they are necessary, even for the Arabs, for basic things like +;; dictionary entries, children's books, and occasional disambiguation. +;; +;; 3. The Arabs don't use it, they use Windows-1256, which also supports +;; Persian, at least, as well as the French characters necessary in +;; Lebanon and North Africa. + +(make-charset + 'arabic-iso8859-6 + "Right-Hand Part of Latin/Arabic Alphabet (ISO/IEC 8859-6): ISO-IR-127" + '(dimension 1 + registry "ISO8859-6" + chars 96 + columns 1 + direction r2l + final ?G + graphic 1 + short-name "RHP of ISO8859/6" + long-name "RHP of Arabic (ISO 8859-6): ISO-IR-127")) + +(loop + for (iso8859-6 unicode) + in '((#xA0 #x00A0) ;; NO-BREAK SPACE + (#xA4 #x00A4) ;; CURRENCY SIGN + (#xAC #x060C) ;; ARABIC COMMA + (#xAD #x00AD) ;; SOFT HYPHEN + (#xBB #x061B) ;; ARABIC SEMICOLON + (#xBF #x061F) ;; ARABIC QUESTION MARK + (#xC1 #x0621) ;; ARABIC LETTER HAMZA + (#xC2 #x0622) ;; ARABIC LETTER ALEF WITH MADDA ABOVE + (#xC3 #x0623) ;; ARABIC LETTER ALEF WITH HAMZA ABOVE + (#xC4 #x0624) ;; ARABIC LETTER WAW WITH HAMZA ABOVE + (#xC5 #x0625) ;; ARABIC LETTER ALEF WITH HAMZA BELOW + (#xC6 #x0626) ;; ARABIC LETTER YEH WITH HAMZA ABOVE + (#xC7 #x0627) ;; ARABIC LETTER ALEF + (#xC8 #x0628) ;; ARABIC LETTER BEH + (#xC9 #x0629) ;; ARABIC LETTER TEH MARBUTA + (#xCA #x062A) ;; ARABIC LETTER TEH + (#xCB #x062B) ;; ARABIC LETTER THEH + (#xCC #x062C) ;; ARABIC LETTER JEEM + (#xCD #x062D) ;; ARABIC LETTER HAH + (#xCE #x062E) ;; ARABIC LETTER KHAH + (#xCF #x062F) ;; ARABIC LETTER DAL + (#xD0 #x0630) ;; ARABIC LETTER THAL + (#xD1 #x0631) ;; ARABIC LETTER REH + (#xD2 #x0632) ;; ARABIC LETTER ZAIN + (#xD3 #x0633) ;; ARABIC LETTER SEEN + (#xD4 #x0634) ;; ARABIC LETTER SHEEN + (#xD5 #x0635) ;; ARABIC LETTER SAD + (#xD6 #x0636) ;; ARABIC LETTER DAD + (#xD7 #x0637) ;; ARABIC LETTER TAH + (#xD8 #x0638) ;; ARABIC LETTER ZAH + (#xD9 #x0639) ;; ARABIC LETTER AIN + (#xDA #x063A) ;; ARABIC LETTER GHAIN + (#xE0 #x0640) ;; ARABIC TATWEEL + (#xE1 #x0641) ;; ARABIC LETTER FEH + (#xE2 #x0642) ;; ARABIC LETTER QAF + (#xE3 #x0643) ;; ARABIC LETTER KAF + (#xE4 #x0644) ;; ARABIC LETTER LAM + (#xE5 #x0645) ;; ARABIC LETTER MEEM + (#xE6 #x0646) ;; ARABIC LETTER NOON + (#xE7 #x0647) ;; ARABIC LETTER HEH + (#xE8 #x0648) ;; ARABIC LETTER WAW + (#xE9 #x0649) ;; ARABIC LETTER ALEF MAKSURA + (#xEA #x064A) ;; ARABIC LETTER YEH + (#xEB #x064B) ;; ARABIC FATHATAN + (#xEC #x064C) ;; ARABIC DAMMATAN + (#xED #x064D) ;; ARABIC KASRATAN + (#xEE #x064E) ;; ARABIC FATHA + (#xEF #x064F) ;; ARABIC DAMMA + (#xF0 #x0650) ;; ARABIC KASRA + (#xF1 #x0651) ;; ARABIC SHADDA + (#xF2 #x0652));; ARABIC SUKUN + do (set-unicode-conversion (make-char 'arabic-iso8859-6 iso8859-6) + unicode)) + +;;;###autoload +(make-coding-system + 'arabic-iso-8bit-with-esc 'iso2022 ;; GNU's iso-8859-6 is + ;; iso2022-compatible. + "ISO-8859-6 (Arabic)" + '(charset-g0 ascii + charset-g1 arabic-iso8859-6 + charset-g2 t + charset-g3 t + no-iso6429 t + mnemonic "MIME/Arbc")) + diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/japanese.el --- a/lisp/mule/japanese.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/japanese.el Sat Oct 25 21:40:46 2008 +0900 @@ -61,10 +61,6 @@ )) ;;; Syntax of Japanese characters. -(modify-syntax-entry 'katakana-jisx0201 "w") -(modify-syntax-entry 'japanese-jisx0212 "w") - -(modify-syntax-entry 'japanese-jisx0208 "w") (loop for row in '(33 34 40) do (modify-syntax-entry `[japanese-jisx0208 ,row] "_")) (loop for char in '(?$B!<(B ?$B!+(B ?$B!,(B ?$B!3(B ?$B!4(B ?$B!5(B ?$B!6(B ?$B!7(B ?$B!8(B ?$B!9(B ?$B!:(B ?$B!;(B) @@ -428,50 +424,54 @@ "japan" "ja" ) - - (native-coding-system - ;; first, see if an explicit encoding was given. - (lambda (locale) - (let ((case-fold-search t)) - (cond - ;; many unix versions - ((string-match "\\.euc" locale) 'euc-jp) - ((string-match "\\.sjis" locale) 'shift-jis) - - ;; X11R6 (CJKV p. 471) - ((string-match "\\.jis7" locale) 'jis7) - ((string-match "\\.jis8" locale) 'jis8) - ((string-match "\\.mscode" locale) 'shift-jis) - ((string-match "\\.pjis" locale) 'iso-2022-jp) - ((string-match "\\.ujis" locale) 'euc-jp) - - ;; other names in X11R6 locale.alias - ((string-match "\\.ajec" locale) 'euc-jp) - ((string-match "-euc" locale) 'euc-jp) - ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp) - ((string-match "\\.jis" locale) 'jis7) ;; or just jis? - ))) - - ;; aix (CJKV p. 465) - (lambda (locale) - (when (eq system-type 'aix) - (cond - ((string-match "^Ja_JP" locale) 'shift-jis) - ((string-match "^ja_JP" locale) 'euc-jp)))) - - ;; other X11R6 locale.alias - (lambda (locale) - (cond - ((string-match "^Jp_JP" locale) 'euc-jp) - ((and (eq system-type 'hpux) (eq locale "japanese")) - 'shift-jis))) - - ;; fallback - euc-jp) - ;; (input-method . "japanese") (features japan-util) (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B") (documentation . t))) +;; Set the native-coding-system separately so the lambdas get compiled. (Not +;; a huge speed improvement, but this code is called at startup, and every +;; little helps there.) +(set-language-info "Japanese" + 'native-coding-system + (list + ;; first, see if an explicit encoding was given. + (lambda (locale) + (let ((case-fold-search t)) + (cond + ;; many unix versions + ((string-match "\\.euc" locale) 'euc-jp) + ((string-match "\\.sjis" locale) 'shift-jis) + + ;; X11R6 (CJKV p. 471) + ((string-match "\\.jis7" locale) 'jis7) + ((string-match "\\.jis8" locale) 'jis8) + ((string-match "\\.mscode" locale) 'shift-jis) + ((string-match "\\.pjis" locale) 'iso-2022-jp) + ((string-match "\\.ujis" locale) 'euc-jp) + + ;; other names in X11R6 locale.alias + ((string-match "\\.ajec" locale) 'euc-jp) + ((string-match "-euc" locale) 'euc-jp) + ((string-match "\\.iso-2022-jp" locale) 'iso-2022-jp) + ((string-match "\\.jis" locale) 'jis7) ;; or just jis? + ))) + + ;; aix (CJKV p. 465) + (lambda (locale) + (when (eq system-type 'aix) + (cond + ((string-match "^Ja_JP" locale) 'shift-jis) + ((string-match "^ja_JP" locale) 'euc-jp)))) + + ;; other X11R6 locale.alias + (lambda (locale) + (cond + ((string-match "^Jp_JP" locale) 'euc-jp) + ((and (eq system-type 'hpux) (eq locale "japanese")) + 'shift-jis))) + + ;; fallback + 'euc-jp)) + ;;; japanese.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/korean.el --- a/lisp/mule/korean.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/korean.el Sat Oct 25 21:40:46 2008 +0900 @@ -46,12 +46,8 @@ ;; Syntax of Korean characters. (loop for row from 33 to 34 do (modify-syntax-entry `[korean-ksc5601 ,row] ".")) -(loop for row from 35 to 37 do - (modify-syntax-entry `[korean-ksc5601 ,row] "w")) (loop for row from 38 to 41 do (modify-syntax-entry `[korean-ksc5601 ,row] ".")) -(loop for row from 42 to 126 do - (modify-syntax-entry `[korean-ksc5601 ,row] "w")) ;; Setting for coding-system and quail were moved to ;; language/korean.el. diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/latin.el --- a/lisp/mule/latin.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/latin.el Sat Oct 25 21:40:46 2008 +0900 @@ -124,13 +124,200 @@ (#xDD #xFD) ;; Y WITH ACUTE (#xDE #xFE))) ;; T WITH CEDILLA -(make-coding-system - 'iso-8859-2 'iso2022 "ISO-8859-2 (Latin-2)" - '(charset-g0 ascii - charset-g1 latin-iso8859-2 - charset-g2 t - charset-g3 t - mnemonic "MIME/Ltn-2")) +(make-8-bit-coding-system + 'iso-8859-2 + '((#xA1 ?\u0104) ;; LATIN CAPITAL LETTER A WITH OGONEK + (#xA2 ?\u02D8) ;; BREVE + (#xA3 ?\u0141) ;; LATIN CAPITAL LETTER L WITH STROKE + (#xA5 ?\u013D) ;; LATIN CAPITAL LETTER L WITH CARON + (#xA6 ?\u015A) ;; LATIN CAPITAL LETTER S WITH ACUTE + (#xA9 ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#xAA ?\u015E) ;; LATIN CAPITAL LETTER S WITH CEDILLA + (#xAB ?\u0164) ;; LATIN CAPITAL LETTER T WITH CARON + (#xAC ?\u0179) ;; LATIN CAPITAL LETTER Z WITH ACUTE + (#xAE ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#xAF ?\u017B) ;; LATIN CAPITAL LETTER Z WITH DOT ABOVE + (#xB1 ?\u0105) ;; LATIN SMALL LETTER A WITH OGONEK + (#xB2 ?\u02DB) ;; OGONEK + (#xB3 ?\u0142) ;; LATIN SMALL LETTER L WITH STROKE + (#xB5 ?\u013E) ;; LATIN SMALL LETTER L WITH CARON + (#xB6 ?\u015B) ;; LATIN SMALL LETTER S WITH ACUTE + (#xB7 ?\u02C7) ;; CARON + (#xB9 ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#xBA ?\u015F) ;; LATIN SMALL LETTER S WITH CEDILLA + (#xBB ?\u0165) ;; LATIN SMALL LETTER T WITH CARON + (#xBC ?\u017A) ;; LATIN SMALL LETTER Z WITH ACUTE + (#xBD ?\u02DD) ;; DOUBLE ACUTE ACCENT + (#xBE ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#xBF ?\u017C) ;; LATIN SMALL LETTER Z WITH DOT ABOVE + (#xC0 ?\u0154) ;; LATIN CAPITAL LETTER R WITH ACUTE + (#xC3 ?\u0102) ;; LATIN CAPITAL LETTER A WITH BREVE + (#xC5 ?\u0139) ;; LATIN CAPITAL LETTER L WITH ACUTE + (#xC6 ?\u0106) ;; LATIN CAPITAL LETTER C WITH ACUTE + (#xC8 ?\u010C) ;; LATIN CAPITAL LETTER C WITH CARON + (#xCA ?\u0118) ;; LATIN CAPITAL LETTER E WITH OGONEK + (#xCC ?\u011A) ;; LATIN CAPITAL LETTER E WITH CARON + (#xCF ?\u010E) ;; LATIN CAPITAL LETTER D WITH CARON + (#xD0 ?\u0110) ;; LATIN CAPITAL LETTER D WITH STROKE + (#xD1 ?\u0143) ;; LATIN CAPITAL LETTER N WITH ACUTE + (#xD2 ?\u0147) ;; LATIN CAPITAL LETTER N WITH CARON + (#xD5 ?\u0150) ;; LATIN CAPITAL LETTER O WITH DOUBLE ACUTE + (#xD8 ?\u0158) ;; LATIN CAPITAL LETTER R WITH CARON + (#xD9 ?\u016E) ;; LATIN CAPITAL LETTER U WITH RING ABOVE + (#xDB ?\u0170) ;; LATIN CAPITAL LETTER U WITH DOUBLE ACUTE + (#xDE ?\u0162) ;; LATIN CAPITAL LETTER T WITH CEDILLA + (#xE0 ?\u0155) ;; LATIN SMALL LETTER R WITH ACUTE + (#xE3 ?\u0103) ;; LATIN SMALL LETTER A WITH BREVE + (#xE5 ?\u013A) ;; LATIN SMALL LETTER L WITH ACUTE + (#xE6 ?\u0107) ;; LATIN SMALL LETTER C WITH ACUTE + (#xE8 ?\u010D) ;; LATIN SMALL LETTER C WITH CARON + (#xEA ?\u0119) ;; LATIN SMALL LETTER E WITH OGONEK + (#xEC ?\u011B) ;; LATIN SMALL LETTER E WITH CARON + (#xEF ?\u010F) ;; LATIN SMALL LETTER D WITH CARON + (#xF0 ?\u0111) ;; LATIN SMALL LETTER D WITH STROKE + (#xF1 ?\u0144) ;; LATIN SMALL LETTER N WITH ACUTE + (#xF2 ?\u0148) ;; LATIN SMALL LETTER N WITH CARON + (#xF5 ?\u0151) ;; LATIN SMALL LETTER O WITH DOUBLE ACUTE + (#xF8 ?\u0159) ;; LATIN SMALL LETTER R WITH CARON + (#xF9 ?\u016F) ;; LATIN SMALL LETTER U WITH RING ABOVE + (#xFB ?\u0171) ;; LATIN SMALL LETTER U WITH DOUBLE ACUTE + (#xFE ?\u0163) ;; LATIN SMALL LETTER T WITH CEDILLA + (#xFF ?\u02D9));; DOT ABOVE + "ISO-8859-2 (Latin-2) for Central Europe. +See also `windows-1250', and `iso-8859-1', which is compatible with Latin 2 +when used to write German (or English, of course). " + '(mnemonic "Latin 2" + aliases (iso-latin-2 latin-2))) + +(make-8-bit-coding-system + 'windows-1250 + '((#x80 ?\u20AC) ;; EURO SIGN + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u015A) ;; LATIN CAPITAL LETTER S WITH ACUTE + (#x8D ?\u0164) ;; LATIN CAPITAL LETTER T WITH CARON + (#x8E ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#x8F ?\u0179) ;; LATIN CAPITAL LETTER Z WITH ACUTE + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9A ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u015B) ;; LATIN SMALL LETTER S WITH ACUTE + (#x9D ?\u0165) ;; LATIN SMALL LETTER T WITH CARON + (#x9E ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#x9F ?\u017A) ;; LATIN SMALL LETTER Z WITH ACUTE + (#xA0 ?\u00A0) ;; NO-BREAK SPACE + (#xA1 ?\u02C7) ;; CARON + (#xA2 ?\u02D8) ;; BREVE + (#xA3 ?\u0141) ;; LATIN CAPITAL LETTER L WITH STROKE + (#xA4 ?\u00A4) ;; CURRENCY SIGN + (#xA5 ?\u0104) ;; LATIN CAPITAL LETTER A WITH OGONEK + (#xA6 ?\u00A6) ;; BROKEN BAR + (#xA7 ?\u00A7) ;; SECTION SIGN + (#xA8 ?\u00A8) ;; DIAERESIS + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAA ?\u015E) ;; LATIN CAPITAL LETTER S WITH CEDILLA + (#xAB ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xAC ?\u00AC) ;; NOT SIGN + (#xAD ?\u00AD) ;; SOFT HYPHEN + (#xAE ?\u00AE) ;; REGISTERED SIGN + (#xAF ?\u017B) ;; LATIN CAPITAL LETTER Z WITH DOT ABOVE + (#xB0 ?\u00B0) ;; DEGREE SIGN + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u02DB) ;; OGONEK + (#xB3 ?\u0142) ;; LATIN SMALL LETTER L WITH STROKE + (#xB4 ?\u00B4) ;; ACUTE ACCENT + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u00B6) ;; PILCROW SIGN + (#xB7 ?\u00B7) ;; MIDDLE DOT + (#xB8 ?\u00B8) ;; CEDILLA + (#xB9 ?\u0105) ;; LATIN SMALL LETTER A WITH OGONEK + (#xBA ?\u015F) ;; LATIN SMALL LETTER S WITH CEDILLA + (#xBB ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xBC ?\u013D) ;; LATIN CAPITAL LETTER L WITH CARON + (#xBD ?\u02DD) ;; DOUBLE ACUTE ACCENT + (#xBE ?\u013E) ;; LATIN SMALL LETTER L WITH CARON + (#xBF ?\u017C) ;; LATIN SMALL LETTER Z WITH DOT ABOVE + (#xC0 ?\u0154) ;; LATIN CAPITAL LETTER R WITH ACUTE + (#xC1 ?\u00C1) ;; LATIN CAPITAL LETTER A WITH ACUTE + (#xC2 ?\u00C2) ;; LATIN CAPITAL LETTER A WITH CIRCUMFLEX + (#xC3 ?\u0102) ;; LATIN CAPITAL LETTER A WITH BREVE + (#xC4 ?\u00C4) ;; LATIN CAPITAL LETTER A WITH DIAERESIS + (#xC5 ?\u0139) ;; LATIN CAPITAL LETTER L WITH ACUTE + (#xC6 ?\u0106) ;; LATIN CAPITAL LETTER C WITH ACUTE + (#xC7 ?\u00C7) ;; LATIN CAPITAL LETTER C WITH CEDILLA + (#xC8 ?\u010C) ;; LATIN CAPITAL LETTER C WITH CARON + (#xC9 ?\u00C9) ;; LATIN CAPITAL LETTER E WITH ACUTE + (#xCA ?\u0118) ;; LATIN CAPITAL LETTER E WITH OGONEK + (#xCB ?\u00CB) ;; LATIN CAPITAL LETTER E WITH DIAERESIS + (#xCC ?\u011A) ;; LATIN CAPITAL LETTER E WITH CARON + (#xCD ?\u00CD) ;; LATIN CAPITAL LETTER I WITH ACUTE + (#xCE ?\u00CE) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX + (#xCF ?\u010E) ;; LATIN CAPITAL LETTER D WITH CARON + (#xD0 ?\u0110) ;; LATIN CAPITAL LETTER D WITH STROKE + (#xD1 ?\u0143) ;; LATIN CAPITAL LETTER N WITH ACUTE + (#xD2 ?\u0147) ;; LATIN CAPITAL LETTER N WITH CARON + (#xD3 ?\u00D3) ;; LATIN CAPITAL LETTER O WITH ACUTE + (#xD4 ?\u00D4) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX + (#xD5 ?\u0150) ;; LATIN CAPITAL LETTER O WITH DOUBLE ACUTE + (#xD6 ?\u00D6) ;; LATIN CAPITAL LETTER O WITH DIAERESIS + (#xD7 ?\u00D7) ;; MULTIPLICATION SIGN + (#xD8 ?\u0158) ;; LATIN CAPITAL LETTER R WITH CARON + (#xD9 ?\u016E) ;; LATIN CAPITAL LETTER U WITH RING ABOVE + (#xDA ?\u00DA) ;; LATIN CAPITAL LETTER U WITH ACUTE + (#xDB ?\u0170) ;; LATIN CAPITAL LETTER U WITH DOUBLE ACUTE + (#xDC ?\u00DC) ;; LATIN CAPITAL LETTER U WITH DIAERESIS + (#xDD ?\u00DD) ;; LATIN CAPITAL LETTER Y WITH ACUTE + (#xDE ?\u0162) ;; LATIN CAPITAL LETTER T WITH CEDILLA + (#xDF ?\u00DF) ;; LATIN SMALL LETTER SHARP S + (#xE0 ?\u0155) ;; LATIN SMALL LETTER R WITH ACUTE + (#xE1 ?\u00E1) ;; LATIN SMALL LETTER A WITH ACUTE + (#xE2 ?\u00E2) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX + (#xE3 ?\u0103) ;; LATIN SMALL LETTER A WITH BREVE + (#xE4 ?\u00E4) ;; LATIN SMALL LETTER A WITH DIAERESIS + (#xE5 ?\u013A) ;; LATIN SMALL LETTER L WITH ACUTE + (#xE6 ?\u0107) ;; LATIN SMALL LETTER C WITH ACUTE + (#xE7 ?\u00E7) ;; LATIN SMALL LETTER C WITH CEDILLA + (#xE8 ?\u010D) ;; LATIN SMALL LETTER C WITH CARON + (#xE9 ?\u00E9) ;; LATIN SMALL LETTER E WITH ACUTE + (#xEA ?\u0119) ;; LATIN SMALL LETTER E WITH OGONEK + (#xEB ?\u00EB) ;; LATIN SMALL LETTER E WITH DIAERESIS + (#xEC ?\u011B) ;; LATIN SMALL LETTER E WITH CARON + (#xED ?\u00ED) ;; LATIN SMALL LETTER I WITH ACUTE + (#xEE ?\u00EE) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX + (#xEF ?\u010F) ;; LATIN SMALL LETTER D WITH CARON + (#xF0 ?\u0111) ;; LATIN SMALL LETTER D WITH STROKE + (#xF1 ?\u0144) ;; LATIN SMALL LETTER N WITH ACUTE + (#xF2 ?\u0148) ;; LATIN SMALL LETTER N WITH CARON + (#xF3 ?\u00F3) ;; LATIN SMALL LETTER O WITH ACUTE + (#xF4 ?\u00F4) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX + (#xF5 ?\u0151) ;; LATIN SMALL LETTER O WITH DOUBLE ACUTE + (#xF6 ?\u00F6) ;; LATIN SMALL LETTER O WITH DIAERESIS + (#xF7 ?\u00F7) ;; DIVISION SIGN + (#xF8 ?\u0159) ;; LATIN SMALL LETTER R WITH CARON + (#xF9 ?\u016F) ;; LATIN SMALL LETTER U WITH RING ABOVE + (#xFA ?\u00FA) ;; LATIN SMALL LETTER U WITH ACUTE + (#xFB ?\u0171) ;; LATIN SMALL LETTER U WITH DOUBLE ACUTE + (#xFC ?\u00FC) ;; LATIN SMALL LETTER U WITH DIAERESIS + (#xFD ?\u00FD) ;; LATIN SMALL LETTER Y WITH ACUTE + (#xFE ?\u0163) ;; LATIN SMALL LETTER T WITH CEDILLA + (#xFF ?\u02D9)) ;; DOT ABOVE + "CP 1250, Microsoft's encoding for Central Europe. +See also `iso-8859-2' and `window-1252' for Western Europe. " + '(mnemonic "CP1250" + aliases (cp1250))) ;; @@ -202,13 +389,40 @@ (#xDD #xFD) ;; U WITH BREVE (#xDE #xFE))) ;; S WITH CIRCUMFLEX -(make-coding-system - 'iso-8859-3 'iso2022 "ISO-8859-3 (Latin-3)" - '(charset-g0 ascii - charset-g1 latin-iso8859-3 - charset-g2 t - charset-g3 t - mnemonic "MIME/Ltn-3")) +(make-8-bit-coding-system + 'iso-8859-3 + '((#xA1 ?\u0126) ;; LATIN CAPITAL LETTER H WITH STROKE + (#xA2 ?\u02D8) ;; BREVE + (#xA6 ?\u0124) ;; LATIN CAPITAL LETTER H WITH CIRCUMFLEX + (#xA9 ?\u0130) ;; LATIN CAPITAL LETTER I WITH DOT ABOVE + (#xAA ?\u015E) ;; LATIN CAPITAL LETTER S WITH CEDILLA + (#xAB ?\u011E) ;; LATIN CAPITAL LETTER G WITH BREVE + (#xAC ?\u0134) ;; LATIN CAPITAL LETTER J WITH CIRCUMFLEX + (#xAF ?\u017B) ;; LATIN CAPITAL LETTER Z WITH DOT ABOVE + (#xB1 ?\u0127) ;; LATIN SMALL LETTER H WITH STROKE + (#xB6 ?\u0125) ;; LATIN SMALL LETTER H WITH CIRCUMFLEX + (#xB9 ?\u0131) ;; LATIN SMALL LETTER DOTLESS I + (#xBA ?\u015F) ;; LATIN SMALL LETTER S WITH CEDILLA + (#xBB ?\u011F) ;; LATIN SMALL LETTER G WITH BREVE + (#xBC ?\u0135) ;; LATIN SMALL LETTER J WITH CIRCUMFLEX + (#xBF ?\u017C) ;; LATIN SMALL LETTER Z WITH DOT ABOVE + (#xC5 ?\u010A) ;; LATIN CAPITAL LETTER C WITH DOT ABOVE + (#xC6 ?\u0108) ;; LATIN CAPITAL LETTER C WITH CIRCUMFLEX + (#xD5 ?\u0120) ;; LATIN CAPITAL LETTER G WITH DOT ABOVE + (#xD8 ?\u011C) ;; LATIN CAPITAL LETTER G WITH CIRCUMFLEX + (#xDD ?\u016C) ;; LATIN CAPITAL LETTER U WITH BREVE + (#xDE ?\u015C) ;; LATIN CAPITAL LETTER S WITH CIRCUMFLEX + (#xE5 ?\u010B) ;; LATIN SMALL LETTER C WITH DOT ABOVE + (#xE6 ?\u0109) ;; LATIN SMALL LETTER C WITH CIRCUMFLEX + (#xF5 ?\u0121) ;; LATIN SMALL LETTER G WITH DOT ABOVE + (#xF8 ?\u011D) ;; LATIN SMALL LETTER G WITH CIRCUMFLEX + (#xFD ?\u016D) ;; LATIN SMALL LETTER U WITH BREVE + (#xFE ?\u015D) ;; LATIN SMALL LETTER S WITH CIRCUMFLEX + (#xFF ?\u02D9)) ;; DOT ABOVE + "ISO-8859-3 (Latin-3)" + '(mnemonic "Latin 3" + documentation "Aimed at Turkish, Maltese and Esperanto. " + aliases (iso-latin-3 latin-3))) ;; Latin-4 (ISO-8859-4) @@ -282,13 +496,62 @@ (#xDD #xFD) ;; U WITH TILDE (#xDE #xFE))) ;; U WITH MACRON -(make-coding-system - 'iso-8859-4 'iso2022 "ISO-8859-4 (Latin-4)" - '(charset-g0 ascii - charset-g1 latin-iso8859-4 - charset-g2 t - charset-g3 t - mnemonic "MIME/Ltn-4")) +(make-8-bit-coding-system + 'iso-8859-4 + '((#xA1 ?\u0104) ;; LATIN CAPITAL LETTER A WITH OGONEK + (#xA2 ?\u0138) ;; LATIN SMALL LETTER KRA + (#xA3 ?\u0156) ;; LATIN CAPITAL LETTER R WITH CEDILLA + (#xA5 ?\u0128) ;; LATIN CAPITAL LETTER I WITH TILDE + (#xA6 ?\u013B) ;; LATIN CAPITAL LETTER L WITH CEDILLA + (#xA9 ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#xAA ?\u0112) ;; LATIN CAPITAL LETTER E WITH MACRON + (#xAB ?\u0122) ;; LATIN CAPITAL LETTER G WITH CEDILLA + (#xAC ?\u0166) ;; LATIN CAPITAL LETTER T WITH STROKE + (#xAE ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#xB1 ?\u0105) ;; LATIN SMALL LETTER A WITH OGONEK + (#xB2 ?\u02DB) ;; OGONEK + (#xB3 ?\u0157) ;; LATIN SMALL LETTER R WITH CEDILLA + (#xB5 ?\u0129) ;; LATIN SMALL LETTER I WITH TILDE + (#xB6 ?\u013C) ;; LATIN SMALL LETTER L WITH CEDILLA + (#xB7 ?\u02C7) ;; CARON + (#xB9 ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#xBA ?\u0113) ;; LATIN SMALL LETTER E WITH MACRON + (#xBB ?\u0123) ;; LATIN SMALL LETTER G WITH CEDILLA + (#xBC ?\u0167) ;; LATIN SMALL LETTER T WITH STROKE + (#xBD ?\u014A) ;; LATIN CAPITAL LETTER ENG + (#xBE ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#xBF ?\u014B) ;; LATIN SMALL LETTER ENG + (#xC0 ?\u0100) ;; LATIN CAPITAL LETTER A WITH MACRON + (#xC7 ?\u012E) ;; LATIN CAPITAL LETTER I WITH OGONEK + (#xC8 ?\u010C) ;; LATIN CAPITAL LETTER C WITH CARON + (#xCA ?\u0118) ;; LATIN CAPITAL LETTER E WITH OGONEK + (#xCC ?\u0116) ;; LATIN CAPITAL LETTER E WITH DOT ABOVE + (#xCF ?\u012A) ;; LATIN CAPITAL LETTER I WITH MACRON + (#xD0 ?\u0110) ;; LATIN CAPITAL LETTER D WITH STROKE + (#xD1 ?\u0145) ;; LATIN CAPITAL LETTER N WITH CEDILLA + (#xD2 ?\u014C) ;; LATIN CAPITAL LETTER O WITH MACRON + (#xD3 ?\u0136) ;; LATIN CAPITAL LETTER K WITH CEDILLA + (#xD9 ?\u0172) ;; LATIN CAPITAL LETTER U WITH OGONEK + (#xDD ?\u0168) ;; LATIN CAPITAL LETTER U WITH TILDE + (#xDE ?\u016A) ;; LATIN CAPITAL LETTER U WITH MACRON + (#xE0 ?\u0101) ;; LATIN SMALL LETTER A WITH MACRON + (#xE7 ?\u012F) ;; LATIN SMALL LETTER I WITH OGONEK + (#xE8 ?\u010D) ;; LATIN SMALL LETTER C WITH CARON + (#xEA ?\u0119) ;; LATIN SMALL LETTER E WITH OGONEK + (#xEC ?\u0117) ;; LATIN SMALL LETTER E WITH DOT ABOVE + (#xEF ?\u012B) ;; LATIN SMALL LETTER I WITH MACRON + (#xF0 ?\u0111) ;; LATIN SMALL LETTER D WITH STROKE + (#xF1 ?\u0146) ;; LATIN SMALL LETTER N WITH CEDILLA + (#xF2 ?\u014D) ;; LATIN SMALL LETTER O WITH MACRON + (#xF3 ?\u0137) ;; LATIN SMALL LETTER K WITH CEDILLA + (#xF9 ?\u0173) ;; LATIN SMALL LETTER U WITH OGONEK + (#xFD ?\u0169) ;; LATIN SMALL LETTER U WITH TILDE + (#xFE ?\u016B) ;; LATIN SMALL LETTER U WITH MACRON + (#xFF ?\u02D9));; DOT ABOVE + "ISO-8859-4 (Latin-4)" + '(mnemonic "Latin 4" + aliases (iso-latin-4 latin-4) + documentation "Obsolete coding system for the Baltic rim. ")) ;; Latin-8 (ISO 8859-14) Celtic. @@ -440,15 +703,19 @@ (#xDD #xFD) ;; Y WITH ACUTE (#xDE #xFE))) ;; THORN -(make-coding-system - 'iso-8859-15 'iso2022 - "ISO 4873 conforming 8-bit code (ASCII + Latin 9; aka Latin-1 with Euro)" - `(mnemonic "MIME/Ltn-9" ; bletch - eol-type nil - charset-g0 ascii - charset-g1 latin-iso8859-15 - charset-g2 t - charset-g3 t)) +(make-8-bit-coding-system + 'iso-8859-15 + '((#xA4 ?\u20AC) ;; EURO SIGN + (#xA6 ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#xA8 ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#xB4 ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#xB8 ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#xBC ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#xBD ?\u0153) ;; LATIN SMALL LIGATURE OE + (#xBE ?\u0178)) ;; LATIN CAPITAL LETTER Y WITH DIAERESIS + "ISO 4873 conforming 8-bit code (ASCII + Latin 9; aka Latin-1 with Euro)" + '(mnemonic "Latin 9" + aliases (iso-latin-9 latin-9 latin-0))) ;; end of ISO 8859-15. @@ -546,13 +813,51 @@ (#xDE #xFE))) ;; T WITH COMMA BELOW ;; Add a coding system for ISO 8859-16. -(make-coding-system - 'iso-8859-16 'iso2022 "MIME ISO-8859-16" - '(charset-g0 ascii - charset-g1 latin-iso8859-16 - charset-g2 t ; grrr - charset-g3 t ; grrr - mnemonic "MIME/Ltn-10")) +(make-8-bit-coding-system + 'iso-8859-16 + '((#xA1 ?\u0104) ;; LATIN CAPITAL LETTER A WITH OGONEK + (#xA2 ?\u0105) ;; LATIN SMALL LETTER A WITH OGONEK + (#xA3 ?\u0141) ;; LATIN CAPITAL LETTER L WITH STROKE + (#xA4 ?\u20AC) ;; EURO SIGN + (#xA5 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#xA6 ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#xA8 ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#xAA ?\u0218) ;; LATIN CAPITAL LETTER S WITH COMMA BELOW + (#xAC ?\u0179) ;; LATIN CAPITAL LETTER Z WITH ACUTE + (#xAE ?\u017A) ;; LATIN SMALL LETTER Z WITH ACUTE + (#xAF ?\u017B) ;; LATIN CAPITAL LETTER Z WITH DOT ABOVE + (#xB2 ?\u010C) ;; LATIN CAPITAL LETTER C WITH CARON + (#xB3 ?\u0142) ;; LATIN SMALL LETTER L WITH STROKE + (#xB4 ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#xB5 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#xB8 ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#xB9 ?\u010D) ;; LATIN SMALL LETTER C WITH CARON + (#xBA ?\u0219) ;; LATIN SMALL LETTER S WITH COMMA BELOW + (#xBC ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#xBD ?\u0153) ;; LATIN SMALL LIGATURE OE + (#xBE ?\u0178) ;; LATIN CAPITAL LETTER Y WITH DIAERESIS + (#xBF ?\u017C) ;; LATIN SMALL LETTER Z WITH DOT ABOVE + (#xC3 ?\u0102) ;; LATIN CAPITAL LETTER A WITH BREVE + (#xC5 ?\u0106) ;; LATIN CAPITAL LETTER C WITH ACUTE + (#xD0 ?\u0110) ;; LATIN CAPITAL LETTER D WITH STROKE + (#xD1 ?\u0143) ;; LATIN CAPITAL LETTER N WITH ACUTE + (#xD5 ?\u0150) ;; LATIN CAPITAL LETTER O WITH DOUBLE ACUTE + (#xD7 ?\u015A) ;; LATIN CAPITAL LETTER S WITH ACUTE + (#xD8 ?\u0170) ;; LATIN CAPITAL LETTER U WITH DOUBLE ACUTE + (#xDD ?\u0118) ;; LATIN CAPITAL LETTER E WITH OGONEK + (#xDE ?\u021A) ;; LATIN CAPITAL LETTER T WITH COMMA BELOW + (#xE3 ?\u0103) ;; LATIN SMALL LETTER A WITH BREVE + (#xE5 ?\u0107) ;; LATIN SMALL LETTER C WITH ACUTE + (#xF0 ?\u0111) ;; LATIN SMALL LETTER D WITH STROKE + (#xF1 ?\u0144) ;; LATIN SMALL LETTER N WITH ACUTE + (#xF5 ?\u0151) ;; LATIN SMALL LETTER O WITH DOUBLE ACUTE + (#xF7 ?\u015B) ;; LATIN SMALL LETTER S WITH ACUTE + (#xF8 ?\u0171) ;; LATIN SMALL LETTER U WITH DOUBLE ACUTE + (#xFD ?\u0119) ;; LATIN SMALL LETTER E WITH OGONEK + (#xFE ?\u021B)) ;; LATIN SMALL LETTER T WITH COMMA BELOW + "ISO-8859-16 (Latin-10)" + '(mnemonic "Latin 10" + aliases (iso-latin-10))) ;; end of ISO 8859-16. @@ -588,7 +893,7 @@ (string (char-syntax (make-char 'latin-iso8859-1 i))) syntax-table)) -;; Case. #### Bug: this doesn't handle I WITH DOT ABOVE. +;; Case. The Turkish case idiosyncracy is handled with its language environment. (setup-case-pairs 'latin-iso8859-9 '((#xC0 #xE0) ;; A WITH GRAVE @@ -618,13 +923,27 @@ (#xDC #xFC) ;; U WITH DIAERESIS (#xDE #xFE))) ;; S WITH CEDILLA -(make-coding-system - 'iso-8859-9 'iso2022 "ISO-8859-9 (Latin-5)" - '(charset-g0 ascii - charset-g1 latin-iso8859-9 - charset-g2 t - charset-g3 t - mnemonic "MIME/Ltn-5")) +;; LATIN CAPITAL LETTER I WITH DOT ABOVE +(put-case-table 'downcase + (make-char 'latin-iso8859-9 #xdd) + ?i (standard-case-table)) + +;; LATIN SMALL LETTER DOTLESS I +(put-case-table 'upcase + (make-char 'latin-iso8859-9 #xfd) + ?I (standard-case-table)) + +(make-8-bit-coding-system + 'iso-8859-9 + '((#xD0 ?\u011E) ;; LATIN CAPITAL LETTER G WITH BREVE + (#xDD ?\u0130) ;; LATIN CAPITAL LETTER I WITH DOT ABOVE + (#xDE ?\u015E) ;; LATIN CAPITAL LETTER S WITH CEDILLA + (#xF0 ?\u011F) ;; LATIN SMALL LETTER G WITH BREVE + (#xFD ?\u0131) ;; LATIN SMALL LETTER DOTLESS I + (#xFE ?\u015F)) ;; LATIN SMALL LETTER S WITH CEDILLA + "ISO-8859-9 (Latin-5)" + '(mnemonic "Latin 5" + aliases (iso-latin-5 latin-5))) ;; end of ISO-8859-9 @@ -638,14 +957,15 @@ for ((charset codesys default-input nice-charset-1 nice-charset-2 ;; supported-langs is a list if the doc string is replaced ;; entirely - supported-langs) + supported-langs invalid-sequence-coding-system) langenvs) in '(((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1" " Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, - Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.") + Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish." + windows-1252) (("Danish" "da") ("Dutch" "nl" "TUTORIAL.nl") - ("Faeroese") + ("Faeroese" "fo") ("Finnish" "fi") ("French" "fr" "TUTORIAL.fr" "Bonjour, ,Ag(Ba va?") ("German" "de" "TUTORIAL.de" "\ @@ -666,12 +986,12 @@ " Albanian, Czech, English, German, Hungarian, Polish, Romanian, Serbian, Croatian, Slovak, Slovene, Sorbian (upper and lower), and Swedish.") ;; " added because fontification got screwed up, CVS-20061203. - (("Albanian" nil) + (("Albanian" "sq") ("Croatian" ("hrvatski" "hr") "TUTORIAL.hr") ("Czech" ("cs" "cz") "TUTORIAL.cs" "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!" "latin-2-postfix") ("Hungarian" ("hungarian" "hu")) - ("Polish" "po" "TUTORIAL.pl") + ("Polish" ("pl" "po") "TUTORIAL.pl") ;; #### Is "po" actually used? ("Romanian" "ro" "TUTORIAL.ro" "Bun,Bc(B ziua, bine a,B~(Bi venit!" "latin-2-postfix") ("Serbian" "sr") @@ -685,18 +1005,18 @@ German, Italian, Maltese, Spanish, and Turkish.") (("Afrikaans" "af") ("Catalan" ("catalan" "ca")) - ("Esperanto") - ("Galician") - ("Maltese"))) + ("Esperanto" "eo") + ("Galician" "gl") + ("Maltese" "mt"))) ((latin-iso8859-4 iso-8859-4 "latin-4-prefix" "Latin-4" "ISO-8859-4" " Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, Latvian, Lithuanian, and Norwegian.") (("Estonian" "et") - ("Greenlandic") - ("Lappish") + ("Greenlandic" "kl") + ("Lappish" "se") ("Latvian" "lv") ("Lithuanian" "li"))) - ((latin-iso8859-5 iso-8859-9 "latin-5-prefix" "Latin-5" "ISO-8859-9") + ((latin-iso8859-9 iso-8859-9 "latin-5-prefix" "Latin-5" "ISO-8859-9") (("Turkish" "tr")))) do (set-language-info-alist @@ -705,6 +1025,8 @@ (coding-system ,codesys) (coding-priority ,codesys) (native-coding-system ,codesys) + (invalid-sequence-coding-system ,(or invalid-sequence-coding-system + codesys)) (documentation . ,(if (listp supported-langs) (car supported-langs) (format "\ Generic language environment for %s (%s)." nice-charset-1 nice-charset-2)))) @@ -718,11 +1040,213 @@ (coding-priority ,codesys) (native-coding-system ,codesys) ,@(if locale `((locale . ,locale))) - ,@(if tutorial `((tutorial . ,tutorial))) + ,@(if tutorial `((tutorial . ,tutorial) + (tutorial-coding-system . ,codesys))) ,@(if sample-text `((sample-text . ,sample-text))) (input-method . ,(or input-method default-input)) (documentation . ,(format "\ This language environment supports %s. " name))) '("European")))) +;; The case table for Turkish is special: +;; #### Maybe we should limit this change to interactive functions; this may +;; well be awkward for protocols and so on. +(set-language-info "Turkish" + 'setup-function + (lambda () + ;; The lowercase version of I is dotless i + (put-case-table-pair ?I + (make-char 'latin-iso8859-9 #xfd) + (standard-case-table)) + ;; The uppercase version of i is I with dot + (put-case-table-pair (make-char 'latin-iso8859-9 #xdd) + ?i (standard-case-table)))) + +(set-language-info "Turkish" + 'exit-function + (lambda () + ;; Restore the normal case mappings for the characters. + (put-case-table-pair ?I ?i (standard-case-table)))) + +(make-8-bit-coding-system + 'macintosh + '((#x80 ?\u00C4) ;; LATIN CAPITAL LETTER A WITH DIAERESIS + (#x81 ?\u00C5) ;; LATIN CAPITAL LETTER A WITH RING ABOVE + (#x82 ?\u00C7) ;; LATIN CAPITAL LETTER C WITH CEDILLA + (#x83 ?\u00C9) ;; LATIN CAPITAL LETTER E WITH ACUTE + (#x84 ?\u00D1) ;; LATIN CAPITAL LETTER N WITH TILDE + (#x85 ?\u00D6) ;; LATIN CAPITAL LETTER O WITH DIAERESIS + (#x86 ?\u00DC) ;; LATIN CAPITAL LETTER U WITH DIAERESIS + (#x87 ?\u00E1) ;; LATIN SMALL LETTER A WITH ACUTE + (#x88 ?\u00E0) ;; LATIN SMALL LETTER A WITH GRAVE + (#x89 ?\u00E2) ;; LATIN SMALL LETTER A WITH CIRCUMFLEX + (#x8A ?\u00E4) ;; LATIN SMALL LETTER A WITH DIAERESIS + (#x8B ?\u00E3) ;; LATIN SMALL LETTER A WITH TILDE + (#x8C ?\u00E5) ;; LATIN SMALL LETTER A WITH RING ABOVE + (#x8D ?\u00E7) ;; LATIN SMALL LETTER C WITH CEDILLA + (#x8E ?\u00E9) ;; LATIN SMALL LETTER E WITH ACUTE + (#x8F ?\u00E8) ;; LATIN SMALL LETTER E WITH GRAVE + (#x90 ?\u00EA) ;; LATIN SMALL LETTER E WITH CIRCUMFLEX + (#x91 ?\u00EB) ;; LATIN SMALL LETTER E WITH DIAERESIS + (#x92 ?\u00ED) ;; LATIN SMALL LETTER I WITH ACUTE + (#x93 ?\u00EC) ;; LATIN SMALL LETTER I WITH GRAVE + (#x94 ?\u00EE) ;; LATIN SMALL LETTER I WITH CIRCUMFLEX + (#x95 ?\u00EF) ;; LATIN SMALL LETTER I WITH DIAERESIS + (#x96 ?\u00F1) ;; LATIN SMALL LETTER N WITH TILDE + (#x97 ?\u00F3) ;; LATIN SMALL LETTER O WITH ACUTE + (#x98 ?\u00F2) ;; LATIN SMALL LETTER O WITH GRAVE + (#x99 ?\u00F4) ;; LATIN SMALL LETTER O WITH CIRCUMFLEX + (#x9A ?\u00F6) ;; LATIN SMALL LETTER O WITH DIAERESIS + (#x9B ?\u00F5) ;; LATIN SMALL LETTER O WITH TILDE + (#x9C ?\u00FA) ;; LATIN SMALL LETTER U WITH ACUTE + (#x9D ?\u00F9) ;; LATIN SMALL LETTER U WITH GRAVE + (#x9E ?\u00FB) ;; LATIN SMALL LETTER U WITH CIRCUMFLEX + (#x9F ?\u00FC) ;; LATIN SMALL LETTER U WITH DIAERESIS + (#xA0 ?\u2020) ;; DAGGER + (#xA1 ?\u00B0) ;; DEGREE SIGN + (#xA2 ?\u00A2) ;; CENT SIGN + (#xA3 ?\u00A3) ;; POUND SIGN + (#xA4 ?\u00A7) ;; SECTION SIGN + (#xA5 ?\u2022) ;; BULLET + (#xA6 ?\u00B6) ;; PILCROW SIGN + (#xA7 ?\u00DF) ;; LATIN SMALL LETTER SHARP S + (#xA8 ?\u00AE) ;; REGISTERED SIGN + (#xA9 ?\u00A9) ;; COPYRIGHT SIGN + (#xAA ?\u2122) ;; TRADE MARK SIGN + (#xAB ?\u00B4) ;; ACUTE ACCENT + (#xAC ?\u00A8) ;; DIAERESIS + (#xAD ?\u2260) ;; NOT EQUAL TO + (#xAE ?\u00C6) ;; LATIN CAPITAL LETTER AE + (#xAF ?\u00D8) ;; LATIN CAPITAL LETTER O WITH STROKE + (#xB0 ?\u221E) ;; INFINITY + (#xB1 ?\u00B1) ;; PLUS-MINUS SIGN + (#xB2 ?\u2264) ;; LESS-THAN OR EQUAL TO + (#xB3 ?\u2265) ;; GREATER-THAN OR EQUAL TO + (#xB4 ?\u00A5) ;; YEN SIGN + (#xB5 ?\u00B5) ;; MICRO SIGN + (#xB6 ?\u2202) ;; PARTIAL DIFFERENTIAL + (#xB7 ?\u2211) ;; N-ARY SUMMATION + (#xB8 ?\u220F) ;; N-ARY PRODUCT + (#xB9 ?\u03C0) ;; GREEK SMALL LETTER PI + (#xBA ?\u222B) ;; INTEGRAL + (#xBB ?\u00AA) ;; FEMININE ORDINAL INDICATOR + (#xBC ?\u00BA) ;; MASCULINE ORDINAL INDICATOR + (#xBD ?\u03A9) ;; GREEK CAPITAL LETTER OMEGA + (#xBE ?\u00E6) ;; LATIN SMALL LETTER AE + (#xBF ?\u00F8) ;; LATIN SMALL LETTER O WITH STROKE + (#xC0 ?\u00BF) ;; INVERTED QUESTION MARK + (#xC1 ?\u00A1) ;; INVERTED EXCLAMATION MARK + (#xC2 ?\u00AC) ;; NOT SIGN + (#xC3 ?\u221A) ;; SQUARE ROOT + (#xC4 ?\u0192) ;; LATIN SMALL LETTER F WITH HOOK + (#xC5 ?\u2248) ;; ALMOST EQUAL TO + (#xC6 ?\u2206) ;; INCREMENT + (#xC7 ?\u00AB) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xC8 ?\u00BB) ;; RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + (#xC9 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#xCA ?\u00A0) ;; NO-BREAK SPACE + (#xCB ?\u00C0) ;; LATIN CAPITAL LETTER A WITH GRAVE + (#xCC ?\u00C3) ;; LATIN CAPITAL LETTER A WITH TILDE + (#xCD ?\u00D5) ;; LATIN CAPITAL LETTER O WITH TILDE + (#xCE ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#xCF ?\u0153) ;; LATIN SMALL LIGATURE OE + (#xD0 ?\u2013) ;; EN DASH + (#xD1 ?\u2014) ;; EM DASH + (#xD2 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#xD3 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#xD4 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#xD5 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#xD6 ?\u00F7) ;; DIVISION SIGN + (#xD7 ?\u25CA) ;; LOZENGE + (#xD8 ?\u00FF) ;; LATIN SMALL LETTER Y WITH DIAERESIS + (#xD9 ?\u0178) ;; LATIN CAPITAL LETTER Y WITH DIAERESIS + (#xDA ?\u2044) ;; FRACTION SLASH + (#xDB ?\u20AC) ;; EURO SIGN + (#xDC ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#xDD ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#xDE ?\uFB01) ;; LATIN SMALL LIGATURE FI + (#xDF ?\uFB02) ;; LATIN SMALL LIGATURE FL + (#xE0 ?\u2021) ;; DOUBLE DAGGER + (#xE1 ?\u00B7) ;; MIDDLE DOT + (#xE2 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#xE3 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#xE4 ?\u2030) ;; PER MILLE SIGN + (#xE5 ?\u00C2) ;; LATIN CAPITAL LETTER A WITH CIRCUMFLEX + (#xE6 ?\u00CA) ;; LATIN CAPITAL LETTER E WITH CIRCUMFLEX + (#xE7 ?\u00C1) ;; LATIN CAPITAL LETTER A WITH ACUTE + (#xE8 ?\u00CB) ;; LATIN CAPITAL LETTER E WITH DIAERESIS + (#xE9 ?\u00C8) ;; LATIN CAPITAL LETTER E WITH GRAVE + (#xEA ?\u00CD) ;; LATIN CAPITAL LETTER I WITH ACUTE + (#xEB ?\u00CE) ;; LATIN CAPITAL LETTER I WITH CIRCUMFLEX + (#xEC ?\u00CF) ;; LATIN CAPITAL LETTER I WITH DIAERESIS + (#xED ?\u00CC) ;; LATIN CAPITAL LETTER I WITH GRAVE + (#xEE ?\u00D3) ;; LATIN CAPITAL LETTER O WITH ACUTE + (#xEF ?\u00D4) ;; LATIN CAPITAL LETTER O WITH CIRCUMFLEX + (#xF0 ?\uF8FF) ;; Apple logo + (#xF1 ?\u00D2) ;; LATIN CAPITAL LETTER O WITH GRAVE + (#xF2 ?\u00DA) ;; LATIN CAPITAL LETTER U WITH ACUTE + (#xF3 ?\u00DB) ;; LATIN CAPITAL LETTER U WITH CIRCUMFLEX + (#xF4 ?\u00D9) ;; LATIN CAPITAL LETTER U WITH GRAVE + (#xF5 ?\u0131) ;; LATIN SMALL LETTER DOTLESS I + (#xF6 ?\u02C6) ;; MODIFIER LETTER CIRCUMFLEX ACCENT + (#xF7 ?\u02DC) ;; SMALL TILDE + (#xF8 ?\u00AF) ;; MACRON + (#xF9 ?\u02D8) ;; BREVE + (#xFA ?\u02D9) ;; DOT ABOVE + (#xFB ?\u02DA) ;; RING ABOVE + (#xFC ?\u00B8) ;; CEDILLA + (#xFD ?\u02DD) ;; DOUBLE ACUTE ACCENT + (#xFE ?\u02DB) ;; OGONEK + (#xFF ?\u02C7)) ;; CARON + "The Macintosh encoding for Western Europe and the Americas" + '(mnemonic "MR" + documentation "MacRoman, MIME name macintosh" + aliases (cp10000 MacRoman))) + +(make-8-bit-coding-system + 'windows-1252 + '((#x80 ?\u20AC) ;; EURO SIGN + (#x82 ?\u201A) ;; SINGLE LOW-9 QUOTATION MARK + (#x83 ?\u0192) ;; LATIN SMALL LETTER F WITH HOOK + (#x84 ?\u201E) ;; DOUBLE LOW-9 QUOTATION MARK + (#x85 ?\u2026) ;; HORIZONTAL ELLIPSIS + (#x86 ?\u2020) ;; DAGGER + (#x87 ?\u2021) ;; DOUBLE DAGGER + (#x88 ?\u02C6) ;; MODIFIER LETTER CIRCUMFLEX ACCENT + (#x89 ?\u2030) ;; PER MILLE SIGN + (#x8A ?\u0160) ;; LATIN CAPITAL LETTER S WITH CARON + (#x8B ?\u2039) ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK + (#x8C ?\u0152) ;; LATIN CAPITAL LIGATURE OE + (#x8E ?\u017D) ;; LATIN CAPITAL LETTER Z WITH CARON + (#x91 ?\u2018) ;; LEFT SINGLE QUOTATION MARK + (#x92 ?\u2019) ;; RIGHT SINGLE QUOTATION MARK + (#x93 ?\u201C) ;; LEFT DOUBLE QUOTATION MARK + (#x94 ?\u201D) ;; RIGHT DOUBLE QUOTATION MARK + (#x95 ?\u2022) ;; BULLET + (#x96 ?\u2013) ;; EN DASH + (#x97 ?\u2014) ;; EM DASH + (#x98 ?\u02DC) ;; SMALL TILDE + (#x99 ?\u2122) ;; TRADE MARK SIGN + (#x9A ?\u0161) ;; LATIN SMALL LETTER S WITH CARON + (#x9B ?\u203A) ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + (#x9C ?\u0153) ;; LATIN SMALL LIGATURE OE + (#x9E ?\u017E) ;; LATIN SMALL LETTER Z WITH CARON + (#x9F ?\u0178));; LATIN CAPITAL LETTER Y WITH DIAERESIS + "Microsoft's extension of iso-8859-1 for Western Europe and the Americas. " + '(mnemonic "cp1252" + aliases (cp1252))) + +;; Provide language environments that prefer specific coding systems. +(loop + for coding-system in '(utf-8 windows-1252 macintosh) + with name = nil + with assocked = nil + do + (setq name (create-variant-language-environment "English" coding-system) + assocked (assoc name language-info-alist)) + (setcar assocked + (upcase (symbol-name coding-system))) + (setcdr assocked + (remassq 'locale (cdr assocked)))) + ;;; latin.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-category.el --- a/lisp/mule/mule-category.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-category.el Sat Oct 25 21:40:46 2008 +0900 @@ -244,7 +244,6 @@ (latin-iso8859-4 ?l) (latin-iso8859-9 ?l) (cyrillic-iso8859-5 ?y "Cyrillic character set") - (arabic-iso8859-6 ?b "Arabic character set") (greek-iso8859-7 ?g "Greek character set") (hebrew-iso8859-8 ?w "Hebrew character set") (katakana-jisx0201 ?k "Japanese 1-byte Katakana character set") diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-ccl.el --- a/lisp/mule/mule-ccl.el Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1522 +0,0 @@ -;;; mule-ccl.el --- CCL (Code Conversion Language) compiler -*- coding: iso-2022-7bit; -*- - -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. - -;; Keywords: CCL, mule, multilingual, character set, coding-system - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;; Synched up with: FSF 21.0.90 - -;;; Commentary: - -;; CCL (Code Conversion Language) is a simple programming language to -;; be used for various kind of code conversion. CCL program is -;; compiled to CCL code (vector of integers) and executed by CCL -;; interpreter of Emacs. -;; -;; CCL is used for code conversion at process I/O and file I/O for -;; non-standard coding-system. In addition, it is used for -;; calculating a code point of X's font from a character code. -;; However, since CCL is designed as a powerful programming language, -;; it can be used for more generic calculation. For instance, -;; combination of three or more arithmetic operations can be -;; calculated faster than Emacs Lisp. -;; -;; Syntax and semantics of CCL program is described in the -;; documentation of `define-ccl-program'. - -;;; Code: - -(defconst ccl-command-table - [if branch loop break repeat write-repeat write-read-repeat - read read-if read-branch write call end - read-multibyte-character write-multibyte-character - translate-character mule-to-unicode unicode-to-mule - iterate-multiple-map map-multiple map-single] - "Vector of CCL commands (symbols).") - -;; Put a property to each symbol of CCL commands for the compiler. -(let (op (i 0) (len (length ccl-command-table))) - (while (< i len) - (setq op (aref ccl-command-table i)) - (put op 'ccl-compile-function (intern (format "ccl-compile-%s" op))) - (setq i (1+ i)))) - -(defconst ccl-code-table - [set-register - set-short-const - set-const - set-array - jump - jump-cond - write-register-jump - write-register-read-jump - write-const-jump - write-const-read-jump - write-string-jump - write-array-read-jump - read-jump - branch - read-register - write-expr-const - read-branch - write-register - write-expr-register - call - write-const-string - write-array - end - set-assign-expr-const - set-assign-expr-register - set-expr-const - set-expr-register - jump-cond-expr-const - jump-cond-expr-register - read-jump-cond-expr-const - read-jump-cond-expr-register - ex-cmd - ] - "Vector of CCL compiled codes (symbols).") - -(defconst ccl-extended-code-table - [read-multibyte-character - write-multibyte-character - translate-character - translate-character-const-tbl - mule-to-unicode - unicode-to-mule - nil nil nil nil nil nil nil nil nil nil ; 0x06-0x0f - iterate-multiple-map - map-multiple - map-single - ] - "Vector of CCL extended compiled codes (symbols).") - -;; Put a property to each symbol of CCL codes for the disassembler. -(let (code (i 0) (len (length ccl-code-table))) - (while (< i len) - (setq code (aref ccl-code-table i)) - (put code 'ccl-code i) - (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))) - (setq i (1+ i)))) - -(let (code (i 0) (len (length ccl-extended-code-table))) - (while (< i len) - (setq code (aref ccl-extended-code-table i)) - (if code - (progn - (put code 'ccl-ex-code i) - (put code 'ccl-dump-function (intern (format "ccl-dump-%s" code))))) - (setq i (1+ i)))) - -(defconst ccl-jump-code-list - '(jump jump-cond write-register-jump write-register-read-jump - write-const-jump write-const-read-jump write-string-jump - write-array-read-jump read-jump)) - -;; Put a property `jump-flag' to each CCL code which execute jump in -;; some way. -(let ((l ccl-jump-code-list)) - (while l - (put (car l) 'jump-flag t) - (setq l (cdr l)))) - -(defconst ccl-register-table - [r0 r1 r2 r3 r4 r5 r6 r7] - "Vector of CCL registers (symbols).") - -;; Put a property to indicate register number to each symbol of CCL. -;; registers. -(let (reg (i 0) (len (length ccl-register-table))) - (while (< i len) - (setq reg (aref ccl-register-table i)) - (put reg 'ccl-register-number i) - (setq i (1+ i)))) - -(defconst ccl-arith-table - [+ - * / % & | ^ << >> <8 >8 // nil nil nil - < > == <= >= != de-sjis en-sjis] - "Vector of CCL arithmetic/logical operators (symbols).") - -;; Put a property to each symbol of CCL operators for the compiler. -(let (arith (i 0) (len (length ccl-arith-table))) - (while (< i len) - (setq arith (aref ccl-arith-table i)) - (if arith (put arith 'ccl-arith-code i)) - (setq i (1+ i)))) - -(defconst ccl-assign-arith-table - [+= -= *= /= %= &= |= ^= <<= >>= <8= >8= //=] - "Vector of CCL assignment operators (symbols).") - -;; Put a property to each symbol of CCL assignment operators for the compiler. -(let (arith (i 0) (len (length ccl-assign-arith-table))) - (while (< i len) - (setq arith (aref ccl-assign-arith-table i)) - (put arith 'ccl-self-arith-code i) - (setq i (1+ i)))) - -(defvar ccl-program-vector nil - "Working vector of CCL codes produced by CCL compiler.") -(defvar ccl-current-ic 0 - "The current index for `ccl-program-vector'.") - -;; Embed integer DATA in `ccl-program-vector' at `ccl-current-ic' and -;; increment it. If IC is specified, embed DATA at IC. -(defun ccl-embed-data (data &optional ic) - (if (characterp data) - (setq data (char-int data))) - (if ic - (aset ccl-program-vector ic data) - (let ((len (length ccl-program-vector))) - (if (>= ccl-current-ic len) - (let ((new (make-vector (* len 2) nil))) - (while (> len 0) - (setq len (1- len)) - (aset new len (aref ccl-program-vector len))) - (setq ccl-program-vector new)))) - (aset ccl-program-vector ccl-current-ic data) - (setq ccl-current-ic (1+ ccl-current-ic)))) - -;; Embed pair of SYMBOL and PROP where (get SYMBOL PROP) should give -;; proper index number for SYMBOL. PROP should be -;; `translation-table-id', `code-conversion-map-id', or -;; `ccl-program-idx'. -(defun ccl-embed-symbol (symbol prop) - (ccl-embed-data (cons symbol prop))) - -;; Embed string STR of length LEN in `ccl-program-vector' at -;; `ccl-current-ic'. -(defun ccl-embed-string (len str) - (let ((i 0)) - (while (< i len) - (ccl-embed-data (logior (ash (aref str i) 16) - (if (< (1+ i) len) - (ash (aref str (1+ i)) 8) - 0) - (if (< (+ i 2) len) - (aref str (+ i 2)) - 0))) - (setq i (+ i 3))))) - -;; Embed a relative jump address to `ccl-current-ic' in -;; `ccl-program-vector' at IC without altering the other bit field. -(defun ccl-embed-current-address (ic) - (let ((relative (- ccl-current-ic (1+ ic)))) - (aset ccl-program-vector ic - (logior (aref ccl-program-vector ic) (ash relative 8))))) - -;; Embed CCL code for the operation OP and arguments REG and DATA in -;; `ccl-program-vector' at `ccl-current-ic' in the following format. -;; |----------------- integer (28-bit) ------------------| -;; |------------ 20-bit ------------|- 3-bit --|- 5-bit -| -;; |------------- DATA -------------|-- REG ---|-- OP ---| -;; If REG2 is specified, embed a code in the following format. -;; |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| -;; |-------- DATA -------|-- REG2 --|-- REG ---|-- OP ---| - -;; If REG is a CCL register symbol (e.g. r0, r1...), the register -;; number is embedded. If OP is one of unconditional jumps, DATA is -;; changed to an relative jump address. - -(defun ccl-embed-code (op reg data &optional reg2) - (if (and (> data 0) (get op 'jump-flag)) - ;; DATA is an absolute jump address. Make it relative to the - ;; next of jump code. - (setq data (- data (1+ ccl-current-ic)))) - (let ((code (logior (get op 'ccl-code) - (ash - (if (symbolp reg) (get reg 'ccl-register-number) reg) 5) - (if reg2 - (logior (ash (get reg2 'ccl-register-number) 8) - (ash data 11)) - (ash data 8))))) - (ccl-embed-data code))) - -;; extended ccl command format -;; |- 14-bit -|- 3-bit --|- 3-bit --|- 3-bit --|- 5-bit -| -;; |- EX-OP --|-- REG3 --|-- REG2 --|-- REG ---|-- OP ---| -(defun ccl-embed-extended-command (ex-op reg reg2 reg3) - (let ((data (logior (ash (get ex-op 'ccl-ex-code) 3) - (if (symbolp reg3) - (get reg3 'ccl-register-number) - 0)))) - (ccl-embed-code 'ex-cmd reg data reg2))) - -;; Just advance `ccl-current-ic' by INC. -(defun ccl-increment-ic (inc) - (setq ccl-current-ic (+ ccl-current-ic inc))) - -;; If non-nil, index of the start of the current loop. -(defvar ccl-loop-head nil) -;; If non-nil, list of absolute addresses of the breaking points of -;; the current loop. -(defvar ccl-breaks nil) - -;;;###autoload -(defun ccl-compile (ccl-program) - "Return a compiled code of CCL-PROGRAM as a vector of integer." - (if (or (null (consp ccl-program)) - (null (integerp (car ccl-program))) - (null (listp (car (cdr ccl-program))))) - (error "CCL: Invalid CCL program: %s" ccl-program)) - (if (null (vectorp ccl-program-vector)) - (setq ccl-program-vector (make-vector 8192 0))) - (setq ccl-loop-head nil ccl-breaks nil) - (setq ccl-current-ic 0) - - ;; The first element is the buffer magnification. - (ccl-embed-data (car ccl-program)) - - ;; The second element is the address of the start CCL code for - ;; processing end of input buffer (we call it eof-processor). We - ;; set it later. - (ccl-increment-ic 1) - - ;; Compile the main body of the CCL program. - (ccl-compile-1 (car (cdr ccl-program))) - - ;; Embed the address of eof-processor. - (ccl-embed-data ccl-current-ic 1) - - ;; Then compile eof-processor. - (if (nth 2 ccl-program) - (ccl-compile-1 (nth 2 ccl-program))) - - ;; At last, embed termination code. - (ccl-embed-code 'end 0 0) - - (let ((vec (make-vector ccl-current-ic 0)) - (i 0)) - (while (< i ccl-current-ic) - (aset vec i (aref ccl-program-vector i)) - (setq i (1+ i))) - vec)) - -;; Signal syntax error. -(defun ccl-syntax-error (cmd) - (error "CCL: Syntax error: %s" cmd)) - -;; Check if ARG is a valid CCL register. -(defun ccl-check-register (arg cmd) - (if (get arg 'ccl-register-number) - arg - (error "CCL: Invalid register %s in %s." arg cmd))) - -;; Check if ARG is a valid CCL command. -(defun ccl-check-compile-function (arg cmd) - (or (get arg 'ccl-compile-function) - (error "CCL: Invalid command: %s" cmd))) - -;; In the following code, most ccl-compile-XXXX functions return t if -;; they end with unconditional jump, else return nil. - -;; Compile CCL-BLOCK (see the syntax above). -(defun ccl-compile-1 (ccl-block) - (let (unconditional-jump - cmd) - (if (or (integer-or-char-p ccl-block) - (stringp ccl-block) - (and ccl-block (symbolp (car ccl-block)))) - ;; This block consists of single statement. - (setq ccl-block (list ccl-block))) - - ;; Now CCL-BLOCK is a list of statements. Compile them one by - ;; one. - (while ccl-block - (setq cmd (car ccl-block)) - (setq unconditional-jump - (cond ((integer-or-char-p cmd) - ;; SET statement for the register 0. - (ccl-compile-set (list 'r0 '= cmd))) - - ((stringp cmd) - ;; WRITE statement of string argument. - (ccl-compile-write-string cmd)) - - ((listp cmd) - ;; The other statements. - (cond ((eq (nth 1 cmd) '=) - ;; SET statement of the form `(REG = EXPRESSION)'. - (ccl-compile-set cmd)) - - ((and (symbolp (nth 1 cmd)) - (get (nth 1 cmd) 'ccl-self-arith-code)) - ;; SET statement with an assignment operation. - (ccl-compile-self-set cmd)) - - (t - (funcall (ccl-check-compile-function (car cmd) cmd) - cmd)))) - - (t - (ccl-syntax-error cmd)))) - (setq ccl-block (cdr ccl-block))) - unconditional-jump)) - -(defconst ccl-max-short-const (ash 1 19)) -(defconst ccl-min-short-const (ash -1 19)) - -;; Compile SET statement. -(defun ccl-compile-set (cmd) - (let ((rrr (ccl-check-register (car cmd) cmd)) - (right (nth 2 cmd))) - (cond ((listp right) - ;; CMD has the form `(RRR = (XXX OP YYY))'. - (ccl-compile-expression rrr right)) - - ((integer-or-char-p right) - ;; CMD has the form `(RRR = integer)'. - (if (and (<= right ccl-max-short-const) - (>= right ccl-min-short-const)) - (ccl-embed-code 'set-short-const rrr right) - (ccl-embed-code 'set-const rrr 0) - (ccl-embed-data right))) - - (t - ;; CMD has the form `(RRR = rrr [ array ])'. - (ccl-check-register right cmd) - (let ((ary (nth 3 cmd))) - (if (vectorp ary) - (let ((i 0) (len (length ary))) - (ccl-embed-code 'set-array rrr len right) - (while (< i len) - (ccl-embed-data (aref ary i)) - (setq i (1+ i)))) - (ccl-embed-code 'set-register rrr 0 right)))))) - nil) - -;; Compile SET statement with ASSIGNMENT_OPERATOR. -(defun ccl-compile-self-set (cmd) - (let ((rrr (ccl-check-register (car cmd) cmd)) - (right (nth 2 cmd))) - (if (listp right) - ;; CMD has the form `(RRR ASSIGN_OP (XXX OP YYY))', compile - ;; the right hand part as `(r7 = (XXX OP YYY))' (note: the - ;; register 7 can be used for storing temporary value). - (progn - (ccl-compile-expression 'r7 right) - (setq right 'r7))) - ;; Now CMD has the form `(RRR ASSIGN_OP ARG)'. Compile it as - ;; `(RRR = (RRR OP ARG))'. - (ccl-compile-expression - rrr - (list rrr (intern (substring (symbol-name (nth 1 cmd)) 0 -1)) right))) - nil) - -;; Compile SET statement of the form `(RRR = EXPR)'. -(defun ccl-compile-expression (rrr expr) - (let ((left (car expr)) - (op (get (nth 1 expr) 'ccl-arith-code)) - (right (nth 2 expr))) - (if (listp left) - (progn - ;; EXPR has the form `((EXPR2 OP2 ARG) OP RIGHT)'. Compile - ;; the first term as `(r7 = (EXPR2 OP2 ARG)).' - (ccl-compile-expression 'r7 left) - (setq left 'r7))) - - ;; Now EXPR has the form (LEFT OP RIGHT). - (if (and (eq rrr left) - (< op (length ccl-assign-arith-table))) - ;; Compile this SET statement as `(RRR OP= RIGHT)'. - (if (integer-or-char-p right) - (progn - (ccl-embed-code 'set-assign-expr-const rrr (ash op 3) 'r0) - (ccl-embed-data right)) - (ccl-check-register right expr) - (ccl-embed-code 'set-assign-expr-register rrr (ash op 3) right)) - - ;; Compile this SET statement as `(RRR = (LEFT OP RIGHT))'. - (if (integer-or-char-p right) - (progn - (ccl-embed-code 'set-expr-const rrr (ash op 3) left) - (ccl-embed-data right)) - (ccl-check-register right expr) - (ccl-embed-code 'set-expr-register - rrr - (logior (ash op 3) (get right 'ccl-register-number)) - left))))) - -;; Compile WRITE statement with string argument. -(defun ccl-compile-write-string (str) - (setq str (encode-coding-string str 'binary)) - (let ((len (length str))) - (ccl-embed-code 'write-const-string 1 len) - (ccl-embed-string len str)) - nil) - -;; Compile IF statement of the form `(if CONDITION TRUE-PART FALSE-PART)'. -;; If READ-FLAG is non-nil, this statement has the form -;; `(read-if (REG OPERATOR ARG) TRUE-PART FALSE-PART)'. -(defun ccl-compile-if (cmd &optional read-flag) - (if (and (/= (length cmd) 3) (/= (length cmd) 4)) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((condition (nth 1 cmd)) - (true-cmds (nth 2 cmd)) - (false-cmds (nth 3 cmd)) - jump-cond-address) - (if (and (listp condition) - (listp (car condition))) - ;; If CONDITION is a nested expression, the inner expression - ;; should be compiled at first as SET statement, i.e.: - ;; `(if ((X OP2 Y) OP Z) ...)' is compiled into two statements: - ;; `(r7 = (X OP2 Y)) (if (r7 OP Z) ...)'. - (progn - (ccl-compile-expression 'r7 (car condition)) - (setq condition (cons 'r7 (cdr condition))) - (setq cmd (cons (car cmd) - (cons condition (cdr (cdr cmd))))))) - - (setq jump-cond-address ccl-current-ic) - ;; Compile CONDITION. - (if (symbolp condition) - ;; CONDITION is a register. - (progn - (ccl-check-register condition cmd) - (ccl-embed-code 'jump-cond condition 0)) - ;; CONDITION is a simple expression of the form (RRR OP ARG). - (let ((rrr (car condition)) - (op (get (nth 1 condition) 'ccl-arith-code)) - (arg (nth 2 condition))) - (ccl-check-register rrr cmd) - (if (integer-or-char-p arg) - (progn - (ccl-embed-code (if read-flag 'read-jump-cond-expr-const - 'jump-cond-expr-const) - rrr 0) - (ccl-embed-data op) - (ccl-embed-data arg)) - (ccl-check-register arg cmd) - (ccl-embed-code (if read-flag 'read-jump-cond-expr-register - 'jump-cond-expr-register) - rrr 0) - (ccl-embed-data op) - (ccl-embed-data (get arg 'ccl-register-number))))) - - ;; Compile TRUE-PART. - (let ((unconditional-jump (ccl-compile-1 true-cmds))) - (if (null false-cmds) - ;; This is the place to jump to if condition is false. - (progn - (ccl-embed-current-address jump-cond-address) - (setq unconditional-jump nil)) - (let (end-true-part-address) - (if (not unconditional-jump) - (progn - ;; If TRUE-PART does not end with unconditional jump, we - ;; have to jump to the end of FALSE-PART from here. - (setq end-true-part-address ccl-current-ic) - (ccl-embed-code 'jump 0 0))) - ;; This is the place to jump to if CONDITION is false. - (ccl-embed-current-address jump-cond-address) - ;; Compile FALSE-PART. - (setq unconditional-jump - (and (ccl-compile-1 false-cmds) unconditional-jump)) - (if end-true-part-address - ;; This is the place to jump to after the end of TRUE-PART. - (ccl-embed-current-address end-true-part-address)))) - unconditional-jump))) - -;; Compile BRANCH statement. -(defun ccl-compile-branch (cmd) - (if (< (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (ccl-compile-branch-blocks 'branch - (ccl-compile-branch-expression (nth 1 cmd) cmd) - (cdr (cdr cmd)))) - -;; Compile READ statement of the form `(read-branch EXPR BLOCK0 BLOCK1 ...)'. -(defun ccl-compile-read-branch (cmd) - (if (< (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (ccl-compile-branch-blocks 'read-branch - (ccl-compile-branch-expression (nth 1 cmd) cmd) - (cdr (cdr cmd)))) - -;; Compile EXPRESSION part of BRANCH statement and return register -;; which holds a value of the expression. -(defun ccl-compile-branch-expression (expr cmd) - (if (listp expr) - ;; EXPR has the form `(EXPR2 OP ARG)'. Compile it as SET - ;; statement of the form `(r7 = (EXPR2 OP ARG))'. - (progn - (ccl-compile-expression 'r7 expr) - 'r7) - (ccl-check-register expr cmd))) - -;; Compile BLOCKs of BRANCH statement. CODE is 'branch or 'read-branch. -;; REG is a register which holds a value of EXPRESSION part. BLOCKs -;; is a list of CCL-BLOCKs. -(defun ccl-compile-branch-blocks (code rrr blocks) - (let ((branches (length blocks)) - branch-idx - jump-table-head-address - empty-block-indexes - block-tail-addresses - block-unconditional-jump) - (ccl-embed-code code rrr branches) - (setq jump-table-head-address ccl-current-ic) - ;; The size of jump table is the number of blocks plus 1 (for the - ;; case RRR is out of range). - (ccl-increment-ic (1+ branches)) - (setq empty-block-indexes (list branches)) - ;; Compile each block. - (setq branch-idx 0) - (while blocks - (if (null (car blocks)) - ;; This block is empty. - (setq empty-block-indexes (cons branch-idx empty-block-indexes) - block-unconditional-jump t) - ;; This block is not empty. - (ccl-embed-data (- ccl-current-ic jump-table-head-address) - (+ jump-table-head-address branch-idx)) - (setq block-unconditional-jump (ccl-compile-1 (car blocks))) - (if (not block-unconditional-jump) - (progn - ;; Jump address of the end of branches are embedded later. - ;; For the moment, just remember where to embed them. - (setq block-tail-addresses - (cons ccl-current-ic block-tail-addresses)) - (ccl-embed-code 'jump 0 0)))) - (setq branch-idx (1+ branch-idx)) - (setq blocks (cdr blocks))) - (if (not block-unconditional-jump) - ;; We don't need jump code at the end of the last block. - (setq block-tail-addresses (cdr block-tail-addresses) - ccl-current-ic (1- ccl-current-ic))) - ;; Embed jump address at the tailing jump commands of blocks. - (while block-tail-addresses - (ccl-embed-current-address (car block-tail-addresses)) - (setq block-tail-addresses (cdr block-tail-addresses))) - ;; For empty blocks, make entries in the jump table point directly here. - (while empty-block-indexes - (ccl-embed-data (- ccl-current-ic jump-table-head-address) - (+ jump-table-head-address (car empty-block-indexes))) - (setq empty-block-indexes (cdr empty-block-indexes)))) - ;; Branch command ends by unconditional jump if RRR is out of range. - nil) - -;; Compile LOOP statement. -(defun ccl-compile-loop (cmd) - (if (< (length cmd) 2) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let* ((ccl-loop-head ccl-current-ic) - (ccl-breaks nil) - unconditional-jump) - (setq cmd (cdr cmd)) - (if cmd - (progn - (setq unconditional-jump t) - (while cmd - (setq unconditional-jump - (and (ccl-compile-1 (car cmd)) unconditional-jump)) - (setq cmd (cdr cmd))) - (if (not ccl-breaks) - unconditional-jump - ;; Embed jump address for break statements encountered in - ;; this loop. - (while ccl-breaks - (ccl-embed-current-address (car ccl-breaks)) - (setq ccl-breaks (cdr ccl-breaks)))) - nil)))) - -;; Compile BREAK statement. -(defun ccl-compile-break (cmd) - (if (/= (length cmd) 1) - (error "CCL: Invalid number of arguments: %s" cmd)) - (if (null ccl-loop-head) - (error "CCL: No outer loop: %s" cmd)) - (setq ccl-breaks (cons ccl-current-ic ccl-breaks)) - (ccl-embed-code 'jump 0 0) - t) - -;; Compile REPEAT statement. -(defun ccl-compile-repeat (cmd) - (if (/= (length cmd) 1) - (error "CCL: Invalid number of arguments: %s" cmd)) - (if (null ccl-loop-head) - (error "CCL: No outer loop: %s" cmd)) - (ccl-embed-code 'jump 0 ccl-loop-head) - t) - -;; Compile WRITE-REPEAT statement. -(defun ccl-compile-write-repeat (cmd) - (if (/= (length cmd) 2) - (error "CCL: Invalid number of arguments: %s" cmd)) - (if (null ccl-loop-head) - (error "CCL: No outer loop: %s" cmd)) - (let ((arg (nth 1 cmd))) - (cond ((integer-or-char-p arg) - (ccl-embed-code 'write-const-jump 0 ccl-loop-head) - (ccl-embed-data arg)) - ((stringp arg) - (setq arg (encode-coding-string arg 'binary)) - (let ((len (length arg))) - (ccl-embed-code 'write-string-jump 0 ccl-loop-head) - (ccl-embed-data len) - (ccl-embed-string len arg))) - (t - (ccl-check-register arg cmd) - (ccl-embed-code 'write-register-jump arg ccl-loop-head)))) - t) - -;; Compile WRITE-READ-REPEAT statement. -(defun ccl-compile-write-read-repeat (cmd) - (if (or (< (length cmd) 2) (> (length cmd) 3)) - (error "CCL: Invalid number of arguments: %s" cmd)) - (if (null ccl-loop-head) - (error "CCL: No outer loop: %s" cmd)) - (let ((rrr (ccl-check-register (nth 1 cmd) cmd)) - (arg (nth 2 cmd))) - (cond ((null arg) - (ccl-embed-code 'write-register-read-jump rrr ccl-loop-head)) - ((integer-or-char-p arg) - (ccl-embed-code 'write-const-read-jump rrr arg ccl-loop-head)) - ((vectorp arg) - (let ((len (length arg)) - (i 0)) - (ccl-embed-code 'write-array-read-jump rrr ccl-loop-head) - (ccl-embed-data len) - (while (< i len) - (ccl-embed-data (aref arg i)) - (setq i (1+ i))))) - (t - (error "CCL: Invalid argument %s: %s" arg cmd))) - (ccl-embed-code 'read-jump rrr ccl-loop-head)) - t) - -;; Compile READ statement. -(defun ccl-compile-read (cmd) - (if (< (length cmd) 2) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let* ((args (cdr cmd)) - (i (1- (length args)))) - (while args - (let ((rrr (ccl-check-register (car args) cmd))) - (ccl-embed-code 'read-register rrr i) - (setq args (cdr args) i (1- i))))) - nil) - -;; Compile READ-IF statement. -(defun ccl-compile-read-if (cmd) - (ccl-compile-if cmd 'read)) - -;; Compile WRITE statement. -(defun ccl-compile-write (cmd) - (if (< (length cmd) 2) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((rrr (nth 1 cmd))) - (cond ((integer-or-char-p rrr) - (ccl-embed-code 'write-const-string 0 rrr)) - ((stringp rrr) - (ccl-compile-write-string rrr)) - ((and (symbolp rrr) (vectorp (nth 2 cmd))) - (ccl-check-register rrr cmd) - ;; CMD has the form `(write REG ARRAY)'. - (let* ((arg (nth 2 cmd)) - (len (length arg)) - (i 0)) - (ccl-embed-code 'write-array rrr len) - (while (< i len) - (if (not (integer-or-char-p (aref arg i))) - (error "CCL: Invalid argument %s: %s" arg cmd)) - (ccl-embed-data (aref arg i)) - (setq i (1+ i))))) - - ((symbolp rrr) - ;; CMD has the form `(write REG ...)'. - (let* ((args (cdr cmd)) - (i (1- (length args)))) - (while args - (setq rrr (ccl-check-register (car args) cmd)) - (ccl-embed-code 'write-register rrr i) - (setq args (cdr args) i (1- i))))) - - ((listp rrr) - ;; CMD has the form `(write (LEFT OP RIGHT))'. - (let ((left (car rrr)) - (op (get (nth 1 rrr) 'ccl-arith-code)) - (right (nth 2 rrr))) - (if (listp left) - (progn - ;; RRR has the form `((EXPR OP2 ARG) OP RIGHT)'. - ;; Compile the first term as `(r7 = (EXPR OP2 ARG))'. - (ccl-compile-expression 'r7 left) - (setq left 'r7))) - ;; Now RRR has the form `(ARG OP RIGHT)'. - (if (integer-or-char-p right) - (progn - (ccl-embed-code 'write-expr-const 0 (ash op 3) left) - (ccl-embed-data right)) - (ccl-check-register right rrr) - (ccl-embed-code 'write-expr-register 0 - (logior (ash op 3) - (get right 'ccl-register-number)))))) - - (t - (error "CCL: Invalid argument: %s" cmd)))) - nil) - -;; Compile CALL statement. -(defun ccl-compile-call (cmd) - (if (/= (length cmd) 2) - (error "CCL: Invalid number of arguments: %s" cmd)) - (if (not (symbolp (nth 1 cmd))) - (error "CCL: Subroutine should be a symbol: %s" cmd)) - (ccl-embed-code 'call 1 0) - (ccl-embed-symbol (nth 1 cmd) 'ccl-program-idx) - nil) - -;; Compile END statement. -(defun ccl-compile-end (cmd) - (if (/= (length cmd) 1) - (error "CCL: Invalid number of arguments: %s" cmd)) - (ccl-embed-code 'end 0 0) - t) - -;; Compile read-multibyte-character -(defun ccl-compile-read-multibyte-character (cmd) - (if (/= (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((RRR (nth 1 cmd)) - (rrr (nth 2 cmd))) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (ccl-embed-extended-command 'read-multibyte-character rrr RRR 0)) - nil) - -;; Compile write-multibyte-character -(defun ccl-compile-write-multibyte-character (cmd) - (if (/= (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((RRR (nth 1 cmd)) - (rrr (nth 2 cmd))) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (ccl-embed-extended-command 'write-multibyte-character rrr RRR 0)) - nil) - -;; Compile translate-character -(defun ccl-compile-translate-character (cmd) - (if (/= (length cmd) 4) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((Rrr (nth 1 cmd)) - (RRR (nth 2 cmd)) - (rrr (nth 3 cmd))) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (cond ((and (symbolp Rrr) (not (get Rrr 'ccl-register-number))) - (ccl-embed-extended-command 'translate-character-const-tbl - rrr RRR 0) - (ccl-embed-symbol Rrr 'translation-table-id)) - (t - (ccl-check-register Rrr cmd) - (ccl-embed-extended-command 'translate-character rrr RRR Rrr)))) - nil) - -;; Compile mule-to-unicode -(defun ccl-compile-mule-to-unicode (cmd) - (if (/= (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((RRR (nth 1 cmd)) - (rrr (nth 2 cmd))) - (ccl-check-register RRR cmd) - (ccl-check-register rrr cmd) - (ccl-embed-extended-command 'mule-to-unicode RRR rrr 0)) - nil) - -;; Given a Unicode code point in register rrr, write the charset ID of the -;; corresponding character in RRR, and the Mule-CCL form of its code in rrr. -(defun ccl-compile-unicode-to-mule (cmd) - (if (/= (length cmd) 3) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((rrr (nth 1 cmd)) - (RRR (nth 2 cmd))) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (ccl-embed-extended-command 'unicode-to-mule rrr RRR 0)) - nil) - -(defun ccl-compile-iterate-multiple-map (cmd) - (ccl-compile-multiple-map-function 'iterate-multiple-map cmd) - nil) - -(defun ccl-compile-map-multiple (cmd) - (if (/= (length cmd) 4) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let (func arg) - (setq func - (lambda (arg mp) - (let ((len 0) result add) - (while arg - (if (consp (car arg)) - (setq add (funcall func (car arg) t) - result (append result add) - add (+ (- (car add)) 1)) - (setq result - (append result - (list (car arg))) - add 1)) - (setq arg (cdr arg) - len (+ len add))) - (if mp - (cons (- len) result) - result)))) - (setq arg (append (list (nth 0 cmd) (nth 1 cmd) (nth 2 cmd)) - (funcall func (nth 3 cmd) nil))) - (ccl-compile-multiple-map-function 'map-multiple arg)) - nil) - -(defun ccl-compile-map-single (cmd) - (if (/= (length cmd) 4) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((RRR (nth 1 cmd)) - (rrr (nth 2 cmd)) - (map (nth 3 cmd))) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (ccl-embed-extended-command 'map-single rrr RRR 0) - (cond ((symbolp map) - (if (get map 'code-conversion-map) - (ccl-embed-symbol map 'code-conversion-map-id) - (error "CCL: Invalid map: %s" map))) - (t - (error "CCL: Invalid type of arguments: %s" cmd)))) - nil) - -(defun ccl-compile-multiple-map-function (command cmd) - (if (< (length cmd) 4) - (error "CCL: Invalid number of arguments: %s" cmd)) - (let ((RRR (nth 1 cmd)) - (rrr (nth 2 cmd)) - (args (nthcdr 3 cmd)) - map) - (ccl-check-register rrr cmd) - (ccl-check-register RRR cmd) - (ccl-embed-extended-command command rrr RRR 0) - (ccl-embed-data (length args)) - (while args - (setq map (car args)) - (cond ((symbolp map) - (if (get map 'code-conversion-map) - (ccl-embed-symbol map 'code-conversion-map-id) - (error "CCL: Invalid map: %s" map))) - ((numberp map) - (ccl-embed-data map)) - (t - (error "CCL: Invalid type of arguments: %s" cmd))) - (setq args (cdr args))))) - - -;;; CCL dump staffs - -;; To avoid byte-compiler warning. -(defvar ccl-code) - -;;;###autoload -(defun ccl-dump (ccl-code) - "Disassemble compiled CCL-CODE." - (let ((len (length ccl-code)) - (buffer-mag (aref ccl-code 0))) - (cond ((= buffer-mag 0) - (insert "Don't output anything.\n")) - ((= buffer-mag 1) - (insert "Out-buffer must be as large as in-buffer.\n")) - (t - (insert - (format "Out-buffer must be %d times bigger than in-buffer.\n" - buffer-mag)))) - (insert "Main-body:\n") - (setq ccl-current-ic 2) - (if (> (aref ccl-code 1) 0) - (progn - (while (< ccl-current-ic (aref ccl-code 1)) - (ccl-dump-1)) - (insert "At EOF:\n"))) - (while (< ccl-current-ic len) - (ccl-dump-1)) - )) - -;; Return a CCL code in `ccl-code' at `ccl-current-ic'. -(defun ccl-get-next-code () - (prog1 - (aref ccl-code ccl-current-ic) - (setq ccl-current-ic (1+ ccl-current-ic)))) - -(defun ccl-dump-1 () - (let* ((code (ccl-get-next-code)) - (cmd (aref ccl-code-table (logand code 31))) - (rrr (ash (logand code 255) -5)) - (cc (ash code -8))) - (insert (format "%5d:[%s] " (1- ccl-current-ic) cmd)) - (funcall (get cmd 'ccl-dump-function) rrr cc))) - -(defun ccl-dump-set-register (rrr cc) - (insert (format "r%d = r%d\n" rrr cc))) - -(defun ccl-dump-set-short-const (rrr cc) - (insert (format "r%d = %d\n" rrr cc))) - -(defun ccl-dump-set-const (rrr ignore) - (insert (format "r%d = %d\n" rrr (ccl-get-next-code)))) - -(defun ccl-dump-set-array (rrr cc) - (let ((rrr2 (logand cc 7)) - (len (ash cc -3)) - (i 0)) - (insert (format "r%d = array[r%d] of length %d\n\t" - rrr rrr2 len)) - (while (< i len) - (insert (format "%d " (ccl-get-next-code))) - (setq i (1+ i))) - (insert "\n"))) - -(defun ccl-dump-jump (ignore cc &optional address) - (insert (format "jump to %d(" (+ (or address ccl-current-ic) cc))) - (if (>= cc 0) - (insert "+")) - (insert (format "%d)\n" (1+ cc)))) - -(defun ccl-dump-jump-cond (rrr cc) - (insert (format "if (r%d == 0), " rrr)) - (ccl-dump-jump nil cc)) - -(defun ccl-dump-write-register-jump (rrr cc) - (insert (format "write r%d, " rrr)) - (ccl-dump-jump nil cc)) - -(defun ccl-dump-write-register-read-jump (rrr cc) - (insert (format "write r%d, read r%d, " rrr rrr)) - (ccl-dump-jump nil cc) - (ccl-get-next-code) ; Skip dummy READ-JUMP - ) - -(defun ccl-extract-arith-op (cc) - (aref ccl-arith-table (ash cc -6))) - -(defun ccl-dump-write-expr-const (ignore cc) - (insert (format "write (r%d %s %d)\n" - (logand cc 7) - (ccl-extract-arith-op cc) - (ccl-get-next-code)))) - -(defun ccl-dump-write-expr-register (ignore cc) - (insert (format "write (r%d %s r%d)\n" - (logand cc 7) - (ccl-extract-arith-op cc) - (logand (ash cc -3) 7)))) - -(defun ccl-dump-insert-char (cc) - (cond ((= cc ?\t) (insert " \"^I\"")) - ((= cc ?\n) (insert " \"^J\"")) - (t (insert (format " \"%c\"" cc))))) - -(defun ccl-dump-write-const-jump (ignore cc) - (let ((address ccl-current-ic)) - (insert "write char") - (ccl-dump-insert-char (ccl-get-next-code)) - (insert ", ") - (ccl-dump-jump nil cc address))) - -(defun ccl-dump-write-const-read-jump (rrr cc) - (let ((address ccl-current-ic)) - (insert "write char") - (ccl-dump-insert-char (ccl-get-next-code)) - (insert (format ", read r%d, " rrr)) - (ccl-dump-jump cc address) - (ccl-get-next-code) ; Skip dummy READ-JUMP - )) - -(defun ccl-dump-write-string-jump (ignore cc) - (let ((address ccl-current-ic) - (len (ccl-get-next-code)) - (i 0)) - (insert "write \"") - (while (< i len) - (let ((code (ccl-get-next-code))) - (insert (ash code -16)) - (if (< (1+ i) len) (insert (logand (ash code -8) 255))) - (if (< (+ i 2) len) (insert (logand code 255)))) - (setq i (+ i 3))) - (insert "\", ") - (ccl-dump-jump nil cc address))) - -(defun ccl-dump-write-array-read-jump (rrr cc) - (let ((address ccl-current-ic) - (len (ccl-get-next-code)) - (i 0)) - (insert (format "write array[r%d] of length %d,\n\t" rrr len)) - (while (< i len) - (ccl-dump-insert-char (ccl-get-next-code)) - (setq i (1+ i))) - (insert (format "\n\tthen read r%d, " rrr)) - (ccl-dump-jump nil cc address) - (ccl-get-next-code) ; Skip dummy READ-JUMP. - )) - -(defun ccl-dump-read-jump (rrr cc) - (insert (format "read r%d, " rrr)) - (ccl-dump-jump nil cc)) - -(defun ccl-dump-branch (rrr len) - (let ((jump-table-head ccl-current-ic) - (i 0)) - (insert (format "jump to array[r%d] of length %d\n\t" rrr len)) - (while (<= i len) - (insert (format "%d " (+ jump-table-head (ccl-get-next-code)))) - (setq i (1+ i))) - (insert "\n"))) - -(defun ccl-dump-read-register (rrr cc) - (insert (format "read r%d (%d remaining)\n" rrr cc))) - -(defun ccl-dump-read-branch (rrr len) - (insert (format "read r%d, " rrr)) - (ccl-dump-branch rrr len)) - -(defun ccl-dump-write-register (rrr cc) - (insert (format "write r%d (%d remaining)\n" rrr cc))) - -(defun ccl-dump-call (ignore cc) - (insert (format "call subroutine #%d\n" cc))) - -(defun ccl-dump-write-const-string (rrr cc) - (if (= rrr 0) - (progn - (insert "write char") - (ccl-dump-insert-char cc) - (newline)) - (let ((len cc) - (i 0)) - (insert "write \"") - (while (< i len) - (let ((code (ccl-get-next-code))) - (insert (format "%c" (lsh code -16))) - (if (< (1+ i) len) - (insert (format "%c" (logand (lsh code -8) 255)))) - (if (< (+ i 2) len) - (insert (format "%c" (logand code 255)))) - (setq i (+ i 3)))) - (insert "\"\n")))) - -(defun ccl-dump-write-array (rrr cc) - (let ((i 0)) - (insert (format "write array[r%d] of length %d\n\t" rrr cc)) - (while (< i cc) - (ccl-dump-insert-char (ccl-get-next-code)) - (setq i (1+ i))) - (insert "\n"))) - -(defun ccl-dump-end (&rest ignore) - (insert "end\n")) - -(defun ccl-dump-set-assign-expr-const (rrr cc) - (insert (format "r%d %s= %d\n" - rrr - (ccl-extract-arith-op cc) - (ccl-get-next-code)))) - -(defun ccl-dump-set-assign-expr-register (rrr cc) - (insert (format "r%d %s= r%d\n" - rrr - (ccl-extract-arith-op cc) - (logand cc 7)))) - -(defun ccl-dump-set-expr-const (rrr cc) - (insert (format "r%d = r%d %s %d\n" - rrr - (logand cc 7) - (ccl-extract-arith-op cc) - (ccl-get-next-code)))) - -(defun ccl-dump-set-expr-register (rrr cc) - (insert (format "r%d = r%d %s r%d\n" - rrr - (logand cc 7) - (ccl-extract-arith-op cc) - (logand (ash cc -3) 7)))) - -(defun ccl-dump-jump-cond-expr-const (rrr cc) - (let ((address ccl-current-ic)) - (insert (format "if !(r%d %s %d), " - rrr - (aref ccl-arith-table (ccl-get-next-code)) - (ccl-get-next-code))) - (ccl-dump-jump nil cc address))) - -(defun ccl-dump-jump-cond-expr-register (rrr cc) - (let ((address ccl-current-ic)) - (insert (format "if !(r%d %s r%d), " - rrr - (aref ccl-arith-table (ccl-get-next-code)) - (ccl-get-next-code))) - (ccl-dump-jump nil cc address))) - -(defun ccl-dump-read-jump-cond-expr-const (rrr cc) - (insert (format "read r%d, " rrr)) - (ccl-dump-jump-cond-expr-const rrr cc)) - -(defun ccl-dump-read-jump-cond-expr-register (rrr cc) - (insert (format "read r%d, " rrr)) - (ccl-dump-jump-cond-expr-register rrr cc)) - -(defun ccl-dump-binary (ccl-code) - (let ((len (length ccl-code)) - (i 2)) - (while (< i len) - (let ((code (aref ccl-code i)) - (j 27)) - (while (>= j 0) - (insert (if (= (logand code (ash 1 j)) 0) ?0 ?1)) - (setq j (1- j))) - (setq code (logand code 31)) - (if (< code (length ccl-code-table)) - (insert (format ":%s" (aref ccl-code-table code)))) - (insert "\n")) - (setq i (1+ i))))) - -(defun ccl-dump-ex-cmd (rrr cc) - (let* ((RRR (logand cc ?\x7)) - (Rrr (logand (ash cc -3) ?\x7)) - (ex-op (aref ccl-extended-code-table (logand (ash cc -6) #x3fff)))) - (insert (format "<%s> " ex-op)) - (funcall (get ex-op 'ccl-dump-function) rrr RRR Rrr))) - -(defun ccl-dump-read-multibyte-character (rrr RRR Rrr) - (insert (format "read-multibyte-character r%d r%d\n" RRR rrr))) - -(defun ccl-dump-write-multibyte-character (rrr RRR Rrr) - (insert (format "write-multibyte-character r%d r%d\n" RRR rrr))) - -(defun ccl-dump-translate-character (rrr RRR Rrr) - (insert (format "translation table(r%d) r%d r%d\n" Rrr RRR rrr))) - -(defun ccl-dump-translate-character-const-tbl (rrr RRR Rrr) - (let ((tbl (ccl-get-next-code))) - (insert (format "translation table(%S) r%d r%d\n" tbl RRR rrr)))) - -(defun ccl-dump-mule-to-unicode (rrr RRR Rrr) - (insert (format "change chars in r%d and r%d to unicode\n" RRR rrr))) - -(defun ccl-dump-unicode-to-mule (rrr RRR Rrr) - (insert (format "converter UCS code %d to a Mule char\n" rrr))) - -(defun ccl-dump-iterate-multiple-map (rrr RRR Rrr) - (let ((notbl (ccl-get-next-code)) - (i 0) id) - (insert (format "iterate-multiple-map r%d r%d\n" RRR rrr)) - (insert (format "\tnumber of maps is %d .\n\t [" notbl)) - (while (< i notbl) - (setq id (ccl-get-next-code)) - (insert (format "%S" id)) - (setq i (1+ i))) - (insert "]\n"))) - -(defun ccl-dump-map-multiple (rrr RRR Rrr) - (let ((notbl (ccl-get-next-code)) - (i 0) id) - (insert (format "map-multiple r%d r%d\n" RRR rrr)) - (insert (format "\tnumber of maps and separators is %d\n\t [" notbl)) - (while (< i notbl) - (setq id (ccl-get-next-code)) - (if (= id -1) - (insert "]\n\t [") - (insert (format "%S " id))) - (setq i (1+ i))) - (insert "]\n"))) - -(defun ccl-dump-map-single (rrr RRR Rrr) - (let ((id (ccl-get-next-code))) - (insert (format "map-single r%d r%d map(%S)\n" RRR rrr id)))) - - -;; CCL emulation staffs - -;; Not yet implemented. - -;; Auto-loaded functions. - -;;;###autoload -(defmacro declare-ccl-program (name &optional vector) - "Declare NAME as a name of CCL program. - -This macro exists for backward compatibility. In the old version of -Emacs, to compile a CCL program which calls another CCL program not -yet defined, it must be declared as a CCL program in advance. But, -now CCL program names are resolved not at compile time but before -execution. - -Optional arg VECTOR is a compiled CCL code of the CCL program." - `(put ',name 'ccl-program-idx (register-ccl-program ',name ,vector))) - -;;;###autoload -(defmacro define-ccl-program (name ccl-program &optional doc) - "Set NAME to be the compiled CCL code of CCL-PROGRAM. - -CCL-PROGRAM has this form: - (BUFFER_MAGNIFICATION - CCL_MAIN_CODE - [ CCL_EOF_CODE ]) - -BUFFER_MAGNIFICATION is an integer value specifying the approximate -output buffer magnification size compared with the bytes of input data -text. If the value is zero, the CCL program can't execute `read' and -`write' commands. - -CCL_MAIN_CODE and CCL_EOF_CODE are CCL program codes. CCL_MAIN_CODE is -executed first. If there are no more input data when a `read' command is -executed in CCL_MAIN_CODE, CCL_EOF_CODE is executed. If CCL_MAIN_CODE is -terminated, CCL_EOF_CODE is not executed. - -Here's the syntax of CCL program code in BNF notation. The lines starting -with two semicolons (and optional leading spaces) describe the semantics. - -CCL_MAIN_CODE := CCL_BLOCK - -CCL_EOF_CODE := CCL_BLOCK - -CCL_BLOCK := STATEMENT | (STATEMENT [STATEMENT ...]) - -STATEMENT := - SET | IF | BRANCH | LOOP | REPEAT | BREAK | READ | WRITE | CALL - | TRANSLATE | MAP | END - -SET := (REG = EXPRESSION) - | (REG ASSIGNMENT_OPERATOR EXPRESSION) - ;; The following form is the same as (r0 = INT-OR-CHAR). - | INT-OR-CHAR - -EXPRESSION := ARG | (EXPRESSION OPERATOR ARG) - -;; Evaluate EXPRESSION. If the result is nonzero, execute -;; CCL_BLOCK_0. Otherwise, execute CCL_BLOCK_1. -IF := (if EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1]) - -;; Evaluate EXPRESSION. Provided that the result is N, execute -;; CCL_BLOCK_N. -BRANCH := (branch EXPRESSION CCL_BLOCK_0 [CCL_BLOCK_1 ...]) - -;; Execute STATEMENTs until (break) or (end) is executed. -LOOP := (loop STATEMENT [STATEMENT ...]) - -;; Terminate the innermost loop. -BREAK := (break) - -REPEAT := - ;; Jump to the head of the innermost loop. - (repeat) - ;; Same as: ((write [REG | INT-OR-CHAR | string]) - ;; (repeat)) - | (write-repeat [REG | INT-OR-CHAR | string]) - ;; Same as: ((write REG [ARRAY]) - ;; (read REG) - ;; (repeat)) - | (write-read-repeat REG [ARRAY]) - ;; Same as: ((write INT-OR-CHAR) - ;; (read REG) - ;; (repeat)) - | (write-read-repeat REG INT-OR-CHAR) - -READ := ;; Set REG_0 to a byte read from the input text, set REG_1 - ;; to the next byte read, and so on. Note that \"byte\" here means - ;; \"some octet from XEmacs' internal representation\", which may - ;; not be that useful to you when non-ASCII characters are involved. - ;; - ;; Yes, this is exactly the opposite of what (write ...) does. - (read REG_0 [REG_1 ...]) - ;; Same as: ((read REG) - ;; (if (REG OPERATOR ARG) CCL_BLOCK_0 CCL_BLOCK_1)) - | (read-if (REG OPERATOR ARG) CCL_BLOCK_0 [CCL_BLOCK_1]) - ;; Same as: ((read REG) - ;; (branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...])) - | (read-branch REG CCL_BLOCK_0 [CCL_BLOCK_1 ...]) - ;; Read a character from the input text, splitting it into its - ;; multibyte representation. Set REG_0 to the charset ID of the - ;; character, and set REG_1 to the code point of the character. If - ;; the dimension of charset is two, set REG_1 to ((CODE0 << 8) | - ;; CODE1), where CODE0 is the first code point and CODE1 is the - ;; second code point. - | (read-multibyte-character REG_0 REG_1) - -WRITE := - ;; Write REG_0, REG_1, ... to the output buffer. If REG_N is - ;; a multibyte character, write the corresponding multibyte - ;; representation. - (write REG_0 [REG_1 ...]) - ;; Same as: ((r7 = EXPRESSION) - ;; (write r7)) - | (write EXPRESSION) - ;; Write the value of `INT-OR-CHAR' to the output buffer. If it - ;; is a multibyte character, write the corresponding multibyte - ;; representation. - | (write INT-OR-CHAR) - ;; Write the byte sequence of `string' as is to the output - ;; buffer. It is encoded by binary coding system, thus, - ;; by this operation, you cannot write multibyte string - ;; as it is. - | (write string) - ;; Same as: (write string) - | string - ;; Provided that the value of REG is N, write Nth element of - ;; ARRAY to the output buffer. If it is a multibyte - ;; character, write the corresponding multibyte - ;; representation. - | (write REG ARRAY) - ;; Write a multibyte representation of a character whose - ;; charset ID is REG_0 and code point is REG_1. If the - ;; dimension of the charset is two, REG_1 should be ((CODE0 << - ;; 8) | CODE1), where CODE0 is the first code point and CODE1 - ;; is the second code point of the character. - | (write-multibyte-character REG_0 REG_1) - -;; Call CCL program whose name is ccl-program-name. -CALL := (call ccl-program-name) - -TRANSLATE := ;; Not implemented under XEmacs, except mule-to-unicode and - ;; unicode-to-mule. - (translate-character REG(table) REG(charset) REG(codepoint)) - | (translate-character SYMBOL REG(charset) REG(codepoint)) - | (mule-to-unicode REG(charset) REG(codepoint)) - | (unicode-to-mule REG(unicode,code) REG(CHARSET)) - -MAP := - (iterate-multiple-map REG REG MAP-IDs) - | (map-multiple REG REG (MAP-SET)) - | (map-single REG REG MAP-ID) -MAP-IDs := MAP-ID ... -MAP-SET := MAP-IDs | (MAP-IDs) MAP-SET -MAP-ID := INT-OR-CHAR - -;; Terminate the CCL program. -END := (end) - -;; CCL registers. These can contain any integer value. As r7 is used by the -;; CCL interpreter itself, its value can change unexpectedly. -REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7 - -ARG := REG | INT-OR-CHAR - -OPERATOR := - ;; Normal arithmetical operators (same meaning as C code). - + | - | * | / | % - - ;; Bitwise operators (same meaning as C code) - | & | `|' | ^ - - ;; Shifting operators (same meaning as C code) - | << | >> - - ;; (REG = ARG_0 <8 ARG_1) means: - ;; (REG = ((ARG_0 << 8) | ARG_1)) - | <8 - - ;; (REG = ARG_0 >8 ARG_1) means: - ;; ((REG = (ARG_0 >> 8)) - ;; (r7 = (ARG_0 & 255))) - | >8 - - ;; (REG = ARG_0 // ARG_1) means: - ;; ((REG = (ARG_0 / ARG_1)) - ;; (r7 = (ARG_0 % ARG_1))) - | // - - ;; Normal comparing operators (same meaning as C code) - | < | > | == | <= | >= | != - - ;; If ARG_0 and ARG_1 are higher and lower byte of Shift-JIS - ;; code, and CHAR is the corresponding JISX0208 character, - ;; (REG = ARG_0 de-sjis ARG_1) means: - ;; ((REG = CODE0) - ;; (r7 = CODE1)) - ;; where CODE0 is the first code point of CHAR, CODE1 is the - ;; second code point of CHAR. - | de-sjis - - ;; If ARG_0 and ARG_1 are the first and second code point of - ;; JISX0208 character CHAR, and SJIS is the correponding - ;; Shift-JIS code, - ;; (REG = ARG_0 en-sjis ARG_1) means: - ;; ((REG = HIGH) - ;; (r7 = LOW)) - ;; where HIGH is the higher byte of SJIS, LOW is the lower - ;; byte of SJIS. - | en-sjis - -ASSIGNMENT_OPERATOR := - ;; Same meaning as C code - += | -= | *= | /= | %= | &= | `|=' | ^= | <<= | >>= - - ;; (REG <8= ARG) is the same as: - ;; ((REG <<= 8) - ;; (REG |= ARG)) - | <8= - - ;; (REG >8= ARG) is the same as: - ;; ((r7 = (REG & 255)) - ;; (REG >>= 8)) - - ;; (REG //= ARG) is the same as: - ;; ((r7 = (REG % ARG)) - ;; (REG /= ARG)) - | //= - -ARRAY := `[' INT-OR-CHAR ... `]' - -INT-OR-CHAR := integer | character -" - `(let ((prog ,(ccl-compile (eval ccl-program)))) - (defconst ,name prog ,doc) - (put ',name 'ccl-program-idx (register-ccl-program ',name prog)) - nil)) - -;;;###autoload -(defmacro check-ccl-program (ccl-program &optional name) - "Check validity of CCL-PROGRAM. -If CCL-PROGRAM is a symbol denoting a CCL program, return -CCL-PROGRAM, else return nil. -If CCL-PROGRAM is a vector and optional arg NAME (symbol) is supplied, -register CCL-PROGRAM by name NAME, and return NAME." - `(if (ccl-program-p ,ccl-program) - (if (vectorp ,ccl-program) - (progn - (register-ccl-program ,name ,ccl-program) - ,name) - ,ccl-program))) - -;;;###autoload -(defun ccl-execute-with-args (ccl-prog &rest args) - "Execute CCL-PROGRAM with registers initialized by the remaining args. -The return value is a vector of resulting CCL registers. - -See the documentation of `define-ccl-program' for the detail of CCL program." - (let ((reg (make-vector 8 0)) - (i 0)) - (while (and args (< i 8)) - (if (not (integerp (car args))) - (error "Arguments should be integer")) - (aset reg i (car args)) - (setq args (cdr args) i (1+ i))) - (ccl-execute ccl-prog reg) - reg)) - -(provide 'ccl) - -;; ccl.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-charset.el --- a/lisp/mule/mule-charset.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-charset.el Sat Oct 25 21:40:46 2008 +0900 @@ -117,11 +117,6 @@ "Useless in XEmacs, returns 1." 1) -(define-obsolete-function-alias 'charset-columns 'charset-width) ;; 19990409 -(define-obsolete-function-alias 'charset-final 'charset-iso-final-char) ;; 19990409 -(define-obsolete-function-alias 'charset-graphic 'charset-iso-graphic-plane) ;; 19990409 -(define-obsolete-function-alias 'charset-doc-string 'charset-description) ;; 19990409 - ;;;; Define setf methods for all settable Charset properties (defsetf charset-registry set-charset-registry) @@ -355,7 +350,6 @@ ;; arabic-2-column "MuleArabic-2" ;; ipa "MuleIPA" ;; ethiopic "Ethiopic-Unicode" -;; ascii-right-to-left "ISO8859-1" ;; indian-is13194 "IS13194-Devanagari" ;; indian-2-column "MuleIndian-2" ;; indian-1-column "MuleIndian-1" diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-cmds.el --- a/lisp/mule/mule-cmds.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-cmds.el Sat Oct 25 21:40:46 2008 +0900 @@ -73,6 +73,14 @@ (let ((coding-system-for-read 'iso-2022-7bit)) (find-file-read-only (expand-file-name "HELLO" data-directory)))) +(defvar system-type-file-name-coding + '((darwin . utf-8)) + "A map from values of `system-type' to invariant file name coding systems. +Used if a give system type does not vary in the coding system it uses for +file names; otherwise, `language-info-alist' is consulted for this +information. This affects the `file-name' coding system alias, but not the +`file-name-coding-system' variable, which in practice is mostly ignored. ") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Language Support Functions ;;; @@ -217,7 +225,15 @@ If there is no value for this property, the MS Windows locale is assumed to have the same name as the - language environment." + language environment. + + invalid-sequence-coding-system + VALUE is a fixed-width 8-bit coding system used to + display Unicode error sequences (using a face to make + it clear that the data is invalid). In Western Europe + this is normally windows-1252; in the Russia and the + former Soviet Union koi8-ru or windows-1251 makes more + sense." (if (symbolp lang-env) (setq lang-env (symbol-name lang-env))) (let (lang-slot prop-slot) @@ -671,7 +687,7 @@ (let ((func (get-language-info current-language-environment 'exit-function))) (run-hooks 'exit-language-environment-hook) - (if (fboundp func) (funcall func)))) + (if (functionp func) (funcall func)))) (setq current-language-environment language-name) (let ((default-eol-type (coding-system-eol-type default-buffer-file-coding-system))) @@ -749,9 +765,28 @@ (require (car required-features)) (setq required-features (cdr required-features)))) (let ((func (get-language-info language-name 'setup-function))) - (if (fboundp func) + (if (functionp func) (funcall func))) + (let ((invalid-sequence-coding-system + (get-language-info language-name 'invalid-sequence-coding-system)) + (disp-table (specifier-instance current-display-table)) + glyph) + (when (consp invalid-sequence-coding-system) + (setq invalid-sequence-coding-system + (car invalid-sequence-coding-system))) + (map-char-table + #'(lambda (key entry) + (setq glyph (make-glyph + (vector + 'string :data + (decode-coding-string (string entry) + invalid-sequence-coding-system)))) + (set-glyph-face glyph 'unicode-invalid-sequence-warning-face) + (put-char-table key glyph disp-table) + nil) + unicode-error-default-translation-table)) + ;; Fit the charsets preferences in unicode conversions for the ;; language environment. (set-language-unicode-precedence-list @@ -893,34 +928,24 @@ ;; Pretty description of encoded string ;; Alist of ISO 2022 control code vs the corresponding mnemonic string. -;; (defvar iso-2022-control-alist -;; '((?\x1b . "ESC") -;; (?\x0e . "SO") -;; (?\x0f . "SI") -;; (?\x8e . "SS2") -;; (?\x8f . "SS3") -;; (?\x9b . "CSI"))) +(defvar iso-2022-control-alist + '((?\x1b . "ESC") + (?\x0e . "SO") + (?\x0f . "SI") + (?\x8e . "SS2") + (?\x8f . "SS3") + (?\x9b . "CSI"))) -;; (defun encoded-string-description (str coding-system) -;; "Return a pretty description of STR that is encoded by CODING-SYSTEM." -;; (setq str (string-as-unibyte str)) -;; (let ((char (aref str 0)) -;; desc) -;; (when (< char 128) -;; (setq desc (or (cdr (assq char iso-2022-control-alist)) -;; (char-to-string char))) -;; (let ((i 1) -;; (len (length str))) -;; (while (< i len) -;; (setq char (aref str i)) -;; (if (>= char 128) -;; (setq desc nil i len) -;; (setq desc (concat desc " " -;; (or (cdr (assq char iso-2022-control-alist)) -;; (char-to-string char))) -;; i (1+ i)))))) -;; (or desc -;; (mapconcat (function (lambda (x) (format "0x%02x" x))) str " ")))) +(defun encoded-string-description (str coding-system) + "Return a pretty description of STR that is encoded by CODING-SYSTEM." +; (setq str (string-as-unibyte str)) + (mapconcat + (if (and coding-system (eq (coding-system-type coding-system) 'iso2022)) + ;; Try to get a pretty description for ISO 2022 escape sequences. + (function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) + (format "#x%02X" x)))) + (function (lambda (x) (format "#x%02X" x)))) + str " ")) ;; (defun encode-coding-char (char coding-system) ;; "Encode CHAR by CODING-SYSTEM and return the resulting string. @@ -1013,9 +1038,9 @@ ;; auto-language-alist deleted. We have a more sophisticated system, ;; with the locales stored in the language data. -;; Initialised with an eval-when-compile in mule/general-late.el, which is -;; compiled after all the language support--and, thus, minority Chinese -;; coding systems and so on--has been loaded. +;; Initialised in mule/general-late.el, which is compiled after all the +;; language support--and, thus, minority Chinese coding systems and so +;; on--has been loaded. (defvar posix-charset-to-coding-system-hash nil "A map from the POSIX locale charset versions of the defined coding systems' names, with all alpha-numeric characters removed, to the actual @@ -1045,6 +1070,9 @@ ;; where the @euro modifier doesn't mean ISO-8859-15 in the 956 ;; I have. (setq charset "iso-8859-15")) + (when (and modifiers (equal modifiers "cyrillic") (null charset)) + ;; Feedback wanted! + (setq charset "windows-1251")) (values language region charset modifiers)) ((and (string-match "^[a-z0-9]+$" locale-string) (assoc-ignore-case locale-string language-info-alist)) @@ -1088,20 +1116,25 @@ (destructive-plist-to-alist (plist-put (plist-put - (plist-put (alist-to-plist (cdr langenv)) - 'native-coding-system - coding-system) - 'coding-system (cons coding-system - (cdr (assoc 'coding-system (cdr langenv))))) - 'coding-priority (cons coding-system - (cdr (assq 'coding-priority (cdr langenv)))))))) + (plist-put + (plist-put (alist-to-plist (cdr langenv)) 'native-coding-system + coding-system) + 'coding-system (cons coding-system + (cdr (assoc 'coding-system (cdr langenv))))) + 'coding-priority (cons coding-system + (cdr (assq 'coding-priority (cdr langenv))))) + ;; The tutorial coding system is important; otherwise the tutorial file + ;; gets loaded in the variant coding system. + 'tutorial-coding-system + (or (car-safe (cdr-safe (assoc 'tutorial-coding-system (cdr langenv)))) + (car-safe (cdr-safe (assoc 'coding-system (cdr langenv))))))))) (defun get-language-environment-from-locale (locale) "Convert LOCALE into a language environment. LOCALE is a C library locale string, as returned by `current-locale'. Uses the `locale' property of the language environment." (block langenv - (multiple-value-bind (language region charset modifiers) + (multiple-value-bind (language ignored-arg charset ignored-arg) (parse-posix-locale-string locale) (let ((case-fold-search t) (desired-coding-system @@ -1377,7 +1410,11 @@ (error (warn "Invalid native-coding-system %s in language environment %s" native language-name))) - (define-coding-system-alias 'file-name 'native) + (define-coding-system-alias 'file-name + (or + (let ((fncs (assq system-type system-type-file-name-coding))) + (and fncs (cdr fncs))) + 'native)) ;; Set the default keyboard and terminal coding systems to the native ;; coding system of the language environment. ;; diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-coding.el --- a/lisp/mule/mule-coding.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-coding.el Sat Oct 25 21:40:46 2008 +0900 @@ -28,6 +28,9 @@ ;;; split off of mule.el and mostly moved to coding.el +;; Needed for make-8-bit-coding-system. +(eval-when-compile (require 'ccl)) + ;;; Code: (defun coding-system-force-on-output (coding-system register) @@ -104,11 +107,6 @@ mnemonic "CText")) (make-coding-system - 'iso-8859-1 'no-conversion - "ISO-8859-1 (Latin-1)" - '(eol-type nil mnemonic "Noconv")) - -(make-coding-system 'iso-2022-8bit-ss2 'iso2022 "ISO-2022 8-bit w/SS2" '(charset-g0 ascii @@ -185,5 +183,524 @@ mnemonic "ISO7/Lock" documentation "ISO-2022 coding system using Locking-Shift for 96-charset." )) + -;;; mule-coding.el ends here +;; This is used by people writing CCL programs, but is called at runtime. +(defun define-translation-hash-table (symbol table) + "Define SYMBOL as the name of the hash translation TABLE for use in CCL. + +Analogous to `define-translation-table', but updates +`translation-hash-table-vector' and the table is for use in the CCL +`lookup-integer' and `lookup-character' functions." + (check-argument-type #'symbolp symbol) + (check-argument-type #'hash-table-p table) + (let ((len (length translation-hash-table-vector)) + (id 0) + done) + (put symbol 'translation-hash-table table) + (while (not done) + (if (>= id len) + (setq translation-hash-table-vector + (vconcat translation-hash-table-vector [nil]))) + (let ((slot (aref translation-hash-table-vector id))) + (if (or (not slot) + (eq (car slot) symbol)) + (progn + (aset translation-hash-table-vector id (cons symbol table)) + (setq done t)) + (setq id (1+ id))))) + (put symbol 'translation-hash-table-id id) + id)) + +(defvar make-8-bit-private-use-start (decode-char 'ucs #xE000) + "Start of a 256 code private use area for make-8-bit-coding-system. + +This is used to ensure that distinct octets on disk for a given coding +system map to distinct XEmacs characters, preventing a spurious changes when +a file is read, not changed, and then written. ") + +(defun make-8-bit-generate-helper (decode-table encode-table + encode-failure-octet) + "Helper function for `make-8-bit-generate-encode-program', which see. + +Deals with the case where ASCII and another character set can both be +encoded unambiguously and completely into the coding-system; if this is so, +returns a list corresponding to such a ccl-program. If not, it returns nil. " + (let ((tentative-encode-program-parts + (eval-when-compile + (let* ((vec-len 128) + (compiled + (append + (ccl-compile + `(1 + (loop + (read-multibyte-character r0 r1) + (if (r0 == ,(charset-id 'ascii)) + (write r1) + ((if (r0 == #xABAB) + ;; #xBFFE is a sentinel in the compiled + ;; program. + ;; #xBFFE is a sentinel in the compiled + ;; program. + ((r0 = r1 & #x7F) + (write r0 ,(make-vector vec-len #xBFFE))) + ((mule-to-unicode r0 r1) + (if (r0 == #xFFFD) + (write #xBEEF) + ((lookup-integer encode-table-sym r0 r3) + (if r7 + (write-multibyte-character r0 r3) + (write #xBEEF)))))))) + (repeat)))) nil)) + (first-part compiled) + (last-part + (member-if-not (lambda (entr) (eq #xBFFE entr)) + (member-if + (lambda (entr) (eq #xBFFE entr)) + first-part)))) + (while compiled + (when (eq #xBFFE (cadr compiled)) + (assert (= vec-len (search '(#xBFFE) (cdr compiled) + :test #'/=)) nil + "Strange ccl vector length") + (setcdr compiled nil)) + (setq compiled (cdr compiled))) + ;; Is the generated code as we expect it to be? + (assert (and (memq #xABAB first-part) + (memq #xBEEF14 last-part)) + nil + "This code assumes that the constant #xBEEF is #xBEEF14 in \ +compiled CCL code,\nand that the constant #xABAB is #xABAB. If that is +not the case, and it appears not to be--that's why you're getting this +message--it will not work. ") + (list first-part last-part vec-len)))) + (charset-lower -1) + (charset-upper -1) + worth-trying known-charsets encode-program + other-charset-vector ucs args-out-of-range) + + (loop for char across decode-table + do (pushnew (char-charset char) known-charsets)) + (setq known-charsets (delq 'ascii known-charsets)) + + (loop for known-charset in known-charsets + do + ;; This is not possible for two dimensional charsets. + (when (eq 1 (charset-dimension known-charset)) + (setq args-out-of-range t) + (if (eq 'control-1 known-charset) + (setq charset-lower 0 + charset-upper 31) + ;; There should be a nicer way to get the limits here. + (condition-case args-out-of-range + (make-char known-charset #x100) + (args-out-of-range + (setq charset-lower (third args-out-of-range) + charset-upper (fourth args-out-of-range))))) + (loop + for i from charset-lower to charset-upper + always (and (setq ucs + (encode-char (make-char known-charset i) 'ucs)) + (gethash ucs encode-table)) + finally (setq worth-trying known-charset)) + + ;; Only trying this for one charset at a time, the first find. + (when worth-trying (return)) + + ;; Okay, this charset is not worth trying, Try the next. + (setq charset-lower -1 + charset-upper -1 + worth-trying nil))) + + (when worth-trying + (setq other-charset-vector + (make-vector (third tentative-encode-program-parts) + encode-failure-octet)) + (loop for i from charset-lower to charset-upper + do (aset other-charset-vector i + (gethash (encode-char (make-char worth-trying i) + 'ucs) encode-table))) + (setq encode-program + (nsublis + (list (cons #xABAB (charset-id worth-trying))) + (nconc + (copy-list (first + tentative-encode-program-parts)) + (append other-charset-vector nil) + (copy-tree (second + tentative-encode-program-parts)))))) + encode-program)) + +(defun make-8-bit-generate-encode-program (decode-table encode-table + encode-failure-octet) + "Generate a CCL program to decode a 8-bit fixed-width charset. + +DECODE-TABLE must have 256 non-cons entries, and will be regarded as +describing a map from the octet corresponding to an offset in the +table to the that entry in the table. ENCODE-TABLE is a hash table +map from unicode values to characters in the range [0,255]. +ENCODE-FAILURE-OCTET describes an integer between 0 and 255 +\(inclusive) to write in the event that a character cannot be encoded. " + (check-argument-type #'vectorp decode-table) + (check-argument-range (length decode-table) #x100 #x100) + (check-argument-type #'hash-table-p encode-table) + (check-argument-type #'integerp encode-failure-octet) + (check-argument-range encode-failure-octet #x00 #xFF) + (let ((encode-program nil) + (general-encode-program + (eval-when-compile + (let ((prog (append + (ccl-compile + `(1 + (loop + (read-multibyte-character r0 r1) + (mule-to-unicode r0 r1) + (if (r0 == #xFFFD) + (write #xBEEF) + ((lookup-integer encode-table-sym r0 r3) + (if r7 + (write-multibyte-character r0 r3) + (write #xBEEF)))) + (repeat)))) nil))) + (assert (memq #xBEEF14 prog) + nil + "This code assumes that the constant #xBEEF is #xBEEF14 \ +in compiled CCL code.\nIf that is not the case, and it appears not to +be--that's why you're getting this message--it will not work. ") + prog))) + (encode-program-with-ascii-optimisation + (eval-when-compile + (let ((prog (append + (ccl-compile + `(1 + (loop + (read-multibyte-character r0 r1) + (if (r0 == ,(charset-id 'ascii)) + (write r1) + ((mule-to-unicode r0 r1) + (if (r0 == #xFFFD) + (write #xBEEF) + ((lookup-integer encode-table-sym r0 r3) + (if r7 + (write-multibyte-character r0 r3) + (write #xBEEF)))))) + (repeat)))) nil))) + (assert (memq #xBEEF14 prog) + nil + "This code assumes that the constant #xBEEF is #xBEEF14 \ +in compiled CCL code.\nIf that is not the case, and it appears not to +be--that's why you're getting this message--it will not work. ") + prog))) + (ascii-encodes-as-itself nil)) + + ;; Is this coding system ASCII-compatible? If so, we can avoid the hash + ;; table lookup for those characters. + (loop + for i from #x00 to #x7f + always (eq (int-to-char i) (gethash i encode-table)) + finally (setq ascii-encodes-as-itself t)) + + ;; Note that this logic handles EBCDIC badly. For example, CP037, + ;; MIME name ebcdic-na, has the entire repertoire of ASCII and + ;; Latin 1, and thus a more optimal ccl encode program would check + ;; for those character sets and use tables. But for now, we do a + ;; hash table lookup for every character. + (if (null ascii-encodes-as-itself) + ;; General encode program. Pros; general and correct. Cons; + ;; slow, a hash table lookup + mule-unicode conversion is done + ;; for every character encoding. + (setq encode-program general-encode-program) + (setq encode-program + ;; Encode program with ascii-ascii mapping (based on a + ;; character's mule character set), and one other mule + ;; character set using table-based encoding, other + ;; character sets using hash table lookups. + ;; make-8-bit-non-ascii-completely-coveredp only returns + ;; such a mapping if some non-ASCII charset with + ;; characters in decode-table is entirely covered by + ;; encode-table. + (make-8-bit-generate-helper decode-table encode-table + encode-failure-octet)) + (unless encode-program + ;; If make-8-bit-non-ascii-completely-coveredp returned nil, + ;; but ASCII still encodes as itself, do one-to-one mapping + ;; for ASCII, and a hash table lookup for everything else. + (setq encode-program encode-program-with-ascii-optimisation))) + + (setq encode-program + (nsublis + (list (cons #xBEEF14 + (logior (lsh encode-failure-octet 8) + #x14))) + (copy-tree encode-program))) + encode-program)) + +(defun make-8-bit-create-decode-encode-tables (unicode-map) + "Return a list \(DECODE-TABLE ENCODE-TABLE) given UNICODE-MAP. +UNICODE-MAP should be an alist mapping from integer octet values to +characters with UCS code points; DECODE-TABLE will be a 256-element +vector, and ENCODE-TABLE will be a hash table mapping from 256 numbers +to 256 distinct characters. " + (check-argument-type #'listp unicode-map) + (let ((decode-table (make-vector 256 nil)) + (encode-table (make-hash-table :size 256)) + (private-use-start (encode-char make-8-bit-private-use-start 'ucs)) + desired-ucs) + + (loop for (external internal) + in unicode-map + do + (aset decode-table external internal) + (assert (not (eq (encode-char internal 'ucs) -1)) + nil + "Looks like you're calling make-8-bit-coding-system in a \ +dumped file, \nand you're either not providing a literal UNICODE-MAP +or PROPS. Don't do that; make-8-bit-coding-system relies on sensible +Unicode mappings being available, which they are at compile time for +dumped files (but this requires the mentioned literals), but not, for +most of them, at run time. ") + + (puthash (encode-char internal 'ucs) + ;; This is semantically an integer, but Dave Love's design + ;; for lookup-integer in CCL means we need to store it as a + ;; character. + (int-to-char external) + encode-table)) + + ;; Now, go through the decode table looking at the characters that + ;; remain nil. If the XEmacs character with that integer is already in + ;; the encode table, map the on-disk octet to a Unicode private use + ;; character. Otherwise map the on-disk octet to the XEmacs character + ;; with that numeric value, to make it clearer what it is. + (dotimes (i 256) + (when (null (aref decode-table i)) + ;; Find a free code point. + (setq desired-ucs i) + (while (gethash desired-ucs encode-table) + ;; In the normal case, the code point chosen will be U+E0XY, where + ;; XY is the hexadecimal octet on disk. In pathological cases + ;; it'll be something else. + (setq desired-ucs (+ private-use-start desired-ucs) + private-use-start (+ private-use-start 1))) + (puthash desired-ucs (int-to-char i) encode-table) + (setq desired-ucs (if (> desired-ucs #xFF) + (decode-char 'ucs desired-ucs) + ;; So we get Latin-1 when run at dump time, + ;; instead of JIT-allocated characters. + (int-to-char desired-ucs))) + (aset decode-table i desired-ucs))) + (values decode-table encode-table))) + +(defun make-8-bit-generate-decode-program (decode-table) + "Given DECODE-TABLE, generate a CCL program to decode an 8-bit charset. +DECODE-TABLE must have 256 non-cons entries, and will be regarded as +describing a map from the octet corresponding to an offset in the +table to the that entry in the table. " + (check-argument-type #'vectorp decode-table) + (check-argument-range (length decode-table) #x100 #x100) + (let ((decode-program-parts + (eval-when-compile + (let* ((compiled + (append + (ccl-compile + `(3 + ((read r0) + (loop + (write-read-repeat r0 ,(make-vector + 256 'sentinel)))))) nil)) + (first-part compiled) + (last-part + (member-if-not #'symbolp + (member-if-not #'integerp first-part)))) + ;; Chop off the sentinel sentinel sentinel [..] part. + (while compiled + (if (symbolp (cadr compiled)) + (setcdr compiled nil)) + (setq compiled (cdr compiled))) + (list first-part last-part))))) + (nconc + ;; copy-list needed, because the structure of the literal provided + ;; by our eval-when-compile hangs around. + (copy-list (first decode-program-parts)) + (append decode-table nil) + (second decode-program-parts)))) + +(defun make-8-bit-choose-category (decode-table) + "Given DECODE-TABLE, return an appropriate coding category. +DECODE-TABLE is a 256-entry vector describing the mapping from octets on +disk to XEmacs characters for some fixed-width 8-bit coding system. " + (check-argument-type #'vectorp decode-table) + (check-argument-range (length decode-table) #x100 #x100) + (block category + (loop + for i from #x80 to #x9F + do (unless (= i (aref decode-table i)) + (return-from category 'no-conversion))) + 'iso-8-1)) + +;;;###autoload +(defun make-8-bit-coding-system (name unicode-map &optional description props) + "Make and return a fixed-width 8-bit CCL coding system named NAME. +NAME must be a symbol, and UNICODE-MAP a list. + +UNICODE-MAP is a plist describing a map from octets in the coding +system NAME (as integers) to XEmacs characters. Those XEmacs +characters will be used explicitly on decoding, but for encoding (most +relevantly, on writing to disk) XEmacs characters that map to the same +Unicode code point will be unified. This means that the ISO-8859-? +characters that map to the same Unicode code point will not be +distinct when written to disk, which is normally what is intended; it +also means that East Asian Han characters from different XEmacs +character sets will not be distinct when written to disk, which is +less often what is intended. + +Any octets not mapped will be decoded into the ISO 8859-1 characters with +the corresponding numeric value; unless another octet maps to that +character, in which case the Unicode private use area will be used. This +avoids spurious changes to files on disk when they contain octets that would +be otherwise remapped to the canonical values for the corresponding +characters in the coding system. + +DESCRIPTION and PROPS are as in `make-coding-system', which see. This +function also accepts two additional (optional) properties in PROPS; +`aliases', giving a list of aliases to be initialized for this +coding-system, and `encode-failure-octet', an integer between 0 and 256 to +write in place of XEmacs characters that cannot be encoded, defaulting to +the code for tilde `~'. " + (check-argument-type #'symbolp name) + (check-argument-type #'listp unicode-map) + (check-argument-type #'stringp + (or description + (setq description + (format "Coding system used for %s." name)))) + (check-valid-plist props) + (let ((encode-failure-octet (or (plist-get props 'encode-failure-octet) + (char-to-int ?~))) + (aliases (plist-get props 'aliases)) + (hash-table-sym (gentemp (format "%s-encode-table" name))) + encode-program decode-program result decode-table encode-table) + + ;; Some more sanity checking. + (check-argument-range encode-failure-octet 0 #xFF) + (check-argument-type #'listp aliases) + + ;; Don't pass on our extra data to make-coding-system. + (setq props (plist-remprop props 'encode-failure-octet) + props (plist-remprop props 'aliases)) + + (multiple-value-setq + (decode-table encode-table) + (make-8-bit-create-decode-encode-tables unicode-map)) + + ;; Register the decode-table. + (define-translation-hash-table hash-table-sym encode-table) + + ;; Generate the programs. + (setq decode-program (make-8-bit-generate-decode-program decode-table) + encode-program (make-8-bit-generate-encode-program + decode-table encode-table encode-failure-octet)) + (unless (vectorp encode-program) + (setq encode-program + (apply #'vector + (nsublis (list (cons 'encode-table-sym hash-table-sym)) + (copy-tree encode-program))))) + (unless (vectorp decode-program) + (setq decode-program + (apply #'vector decode-program))) + + ;; And now generate the actual coding system. + (setq result + (make-coding-system + name 'ccl + description + (plist-put (plist-put props 'decode decode-program) + 'encode encode-program))) + (coding-system-put name '8-bit-fixed t) + (coding-system-put name 'category + (make-8-bit-choose-category decode-table)) + (loop for alias in aliases + do (define-coding-system-alias alias name)) + result)) + +(define-compiler-macro make-8-bit-coding-system (&whole form name unicode-map + &optional description props) + + ;; We provide the compiler macro (= macro that is expanded only on + ;; compilation, and that can punt to a runtime version of the + ;; associate function if necessary) not for reasons of speed, though + ;; it does speed up things at runtime a little, but because the + ;; Unicode mappings are available at compile time in the dumped + ;; files, but they are not available at run time for the vast + ;; majority of them. + + (if (not (and (and (consp name) (eq (car name) 'quote)) + (and (consp unicode-map) (eq (car unicode-map) 'quote)) + (and (or (and (consp props) (eq (car props) 'quote)) + (null props))))) + ;; The call does not use literals; do it at runtime. + form + (setq name (cadr name) + unicode-map (cadr unicode-map) + props (if props (cadr props))) + (let ((encode-failure-octet + (or (plist-get props 'encode-failure-octet) (char-to-int ?~))) + (aliases (plist-get props 'aliases)) + encode-program decode-program + decode-table encode-table) + + ;; Some sanity checking. + (check-argument-range encode-failure-octet 0 #xFF) + (check-argument-type #'listp aliases) + + ;; Don't pass on our extra data to make-coding-system. + (setq props (plist-remprop props 'encode-failure-octet) + props (plist-remprop props 'aliases)) + + ;; Work out encode-table and decode-table. + (multiple-value-setq + (decode-table encode-table) + (make-8-bit-create-decode-encode-tables unicode-map)) + + ;; Generate the decode and encode programs. + (setq decode-program (make-8-bit-generate-decode-program decode-table) + encode-program (make-8-bit-generate-encode-program + decode-table encode-table encode-failure-octet)) + + ;; And return the generated code. + `(let ((encode-table-sym (gentemp (format "%s-encode-table" ',name))) + ;; The case-fold-search bind shouldn't be necessary. If I take + ;; it, out, though, I get: + ;; + ;; (invalid-read-syntax "Multiply defined symbol label" 1) + ;; + ;; when the file is byte compiled. + (case-fold-search t)) + (define-translation-hash-table encode-table-sym ,encode-table) + (make-coding-system + ',name 'ccl ,description + (plist-put (plist-put ',props 'decode + ,(apply #'vector decode-program)) + 'encode + (apply #'vector + (nsublis + (list (cons + 'encode-table-sym + (symbol-value 'encode-table-sym))) + ',encode-program)))) + (coding-system-put ',name '8-bit-fixed t) + (coding-system-put ',name 'category ', + (make-8-bit-choose-category decode-table)) + ,(macroexpand `(loop for alias in ',aliases + do (define-coding-system-alias alias + ',name))) + (find-coding-system ',name))))) + +;; Ideally this would be in latin.el, but code-init.el uses it. +(make-8-bit-coding-system + 'iso-8859-1 + '() ;; No differences from Latin 1. + "ISO-8859-1 (Latin-1)" + '(mnemonic "Latin 1" + documentation "The most used encoding of Western Europe and the Americas." + aliases (iso-latin-1 latin-1))) + diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-msw-init-late.el --- a/lisp/mule/mule-msw-init-late.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-msw-init-late.el Sat Oct 25 21:40:46 2008 +0900 @@ -37,7 +37,6 @@ (greek-iso8859-7 . "Greek") (latin-iso8859-9 . "Turkish") (hebrew-iso8859-8 . "Hebrew") - (arabic-iso8859-6 . "Arabic") (latin-iso8859-4 . "Baltic") (vietnamese-viscii-lower . "Viet Nam") (vietnamese-viscii-upper . "Viet Nam") @@ -54,7 +53,7 @@ (while l (let ((charset (car (car l))) (registry (cdr (car l)))) - (mswindows-set-charset-registry charset registry) + (declare-fboundp (mswindows-set-charset-registry charset registry)) (setq l (cdr l))))) (let ((l '((ascii . 1252) @@ -81,5 +80,5 @@ (while l (let ((charset (car (car l))) (code-page (cdr (car l)))) - (mswindows-set-charset-code-page charset code-page) + (declare-fboundp (mswindows-set-charset-code-page charset code-page)) (setq l (cdr l))))) diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-win32-init.el --- a/lisp/mule/mule-win32-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-win32-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -116,68 +116,83 @@ locale user-default code-page oem)) -(let ((cplist - '(("EBCDIC" 037 "EBCDIC") - ("OEM" 437 "MS-DOS United States") - ("EBCDIC" 500 "EBCDIC \"500V1\"") - ("OEM" 708 "Arabic (ASMO 708)") - ("OEM" 709 "Arabic (ASMO 449+, BCON V4)") - ("OEM" 710 "Arabic (Transparent Arabic)") - ("OEM" 720 "Arabic (Transparent ASMO)") - ("OEM" 737 "Greek (formerly 437G)") - ("OEM" 775 "Baltic") - ("OEM" 850 "MS-DOS Multilingual (Latin I)") - ("OEM" 852 "MS-DOS Slavic (Latin II)") - ("OEM" 855 "IBM Cyrillic (primarily Russian)") - ("OEM" 857 "IBM Turkish") - ("OEM" 860 "MS-DOS Portuguese") - ("OEM" 861 "MS-DOS Icelandic") - ("OEM" 862 "Hebrew") - ("OEM" 863 "MS-DOS Canadian-French") - ("OEM" 864 "Arabic") - ("OEM" 865 "MS-DOS Nordic") - ("OEM" 866 "MS-DOS Russian") - ("OEM" 869 "IBM Modern Greek") - ("Ansi/OEM" 874 "Thai") - ("EBCDIC" 875 "EBCDIC") - ("Ansi/OEM" 932 "Japanese") - ("Ansi/OEM" 936 "Chinese (PRC, Singapore)") - ("Ansi/OEM" 949 "Korean") - ("Ansi/OEM" 950 "Chinese (Taiwan; Hong Kong SAR, PRC)") - ("EBCDIC" 1026 "EBCDIC") - ("ANSI" 1200 "Unicode (BMP of ISO 10646)") - ("ANSI" 1250 "Windows 3.1 Eastern European") - ("ANSI" 1251 "Windows 3.1 Cyrillic") - ("ANSI" 1252 "Windows 3.1 US (ANSI)") - ("ANSI" 1253 "Windows 3.1 Greek") - ("ANSI" 1254 "Windows 3.1 Turkish") - ("ANSI" 1255 "Hebrew") - ("ANSI" 1256 "Arabic") - ("ANSI" 1257 "Baltic") - ("ANSI" 1258 "VietNam") - ("Ansi/OEM" 1361 "Korean (Johab)") - ("Mac" 10000 "Macintosh Roman") - ("Mac" 10001 "Macintosh Japanese") - ("Mac" 10006 "Macintosh Greek I") - ("Mac" 10007 "Macintosh Cyrillic") - ("Mac" 10029 "Macintosh Latin 2") - ("Mac" 10079 "Macintosh Icelandic") - ("Mac" 10081 "Macintosh Turkish")))) - (dolist (cpprops cplist) - (let ((ansioem (first cpprops)) - (cp (second cpprops)) - (name (third cpprops))) - (make-coding-system - (intern (format "windows-%s" cp)) - 'mswindows-multibyte - (format "MS Windows code page %s (%s, %s)" cp ansioem name) - `(mnemonic - ,(format "MSW-%s" cp) - code-page ,cp - documentation - ,(format - "MS Windows Multibyte -- code page %s (%s, %s). +(loop + for (ansioem cp category name) + in '(("EBCDIC" 037 no-conversion "EBCDIC") + ("OEM" 437 no-conversion "MS-DOS United States") + ("EBCDIC" 500 no-conversion "EBCDIC \"500V1\"") + + ;; This is ISO-8859-6. + ;; ("OEM" 708 "Arabic (ASMO 708)") + ("OEM" 709 no-conversion "Arabic (ASMO 449+, BCON V4)") + ("OEM" 710 no-conversion "Arabic (Transparent Arabic)") + ("OEM" 720 no-conversion "Arabic (Transparent ASMO)") + ("OEM" 737 no-conversion "Greek (formerly 437G)") + ("OEM" 775 no-conversion "Baltic") + ("OEM" 850 no-conversion "MS-DOS Multilingual (Latin I)") + ("OEM" 852 no-conversion "MS-DOS Slavic (Latin II)") + ("OEM" 855 no-conversion "IBM Cyrillic (primarily Russian)") + ("OEM" 857 no-conversion "IBM Turkish") + ("OEM" 860 no-conversion "MS-DOS Portuguese") + ("OEM" 861 no-conversion "MS-DOS Icelandic") + ("OEM" 862 no-conversion "Hebrew") + ("OEM" 863 no-conversion "MS-DOS Canadian-French") + ("OEM" 864 no-conversion "Arabic") + ("OEM" 865 no-conversion "MS-DOS Nordic") + ; ("OEM" 866 no-conversion "MS-DOS Russian") + ("OEM" 869 no-conversion "IBM Modern Greek") + ("Ansi/OEM" 874 no-conversion "Thai") + ("EBCDIC" 875 no-conversion "EBCDIC") + ("Ansi/OEM" 932 shift_jis "Japanese") + ("Ansi/OEM" 936 iso_8_2 "Chinese (PRC, Singapore)") + ("Ansi/OEM" 949 iso_8_2 "Korean") + ("Ansi/OEM" 950 big5 "Chinese (Taiwan; Hong Kong SAR, PRC)") + ("EBCDIC" 1026 no-conversion "EBCDIC") + + ;; This code page doesn't work. See + ;; http://blogs.msdn.com/michkap/archive/2005/08/01/446475.aspx + ; ("ANSI" 1200 utf-16-little-endian "Unicode (BMP of ISO 10646)") + + ;; We implement this ourselves, and keeping the same implementation + ;; across platforms means behaviour is a bit more consistent. + ; ("ANSI" 1250 no-conversion "Windows 3.1 Eastern European") + ; ("ANSI" 1251 no-conversion "Windows 3.1 Cyrillic") + ; ("ANSI" 1252 no-conversion "Windows 3.1 US (ANSI)") + + ; ("ANSI" 1253 no-conversion "Windows 3.1 Greek") + ("ANSI" 1254 no-conversion "Windows 3.1 Turkish") + ("ANSI" 1255 no-conversion "Hebrew") + ;; We implement these ourselves. + ; ("ANSI" 1256 no-conversion "Arabic") + ("ANSI" 1257 no-conversion "Baltic") + ("ANSI" 1258 no-conversion "VietNam") + ;; #### Is this category right? I don't have Lunde to hand, and the + ;; online information on Johab is scant. + ("Ansi/OEM" 1361 iso_8_2 "Korean (Johab)") + ("Mac" 10000 no-conversion "Macintosh Roman") + ("Mac" 10001 shift_jis "Macintosh Japanese") + ("Mac" 10006 no-conversion "Macintosh Greek I") + ("Mac" 10007 no-conversion "Macintosh Cyrillic") + ("Mac" 10029 no-conversion "Macintosh Latin 2") + ("Mac" 10079 no-conversion "Macintosh Icelandic") + ("Mac" 10081 no-conversion "Macintosh Turkish")) + do + (make-coding-system + (intern (format "windows-%s" cp)) + 'mswindows-multibyte + (format "MS Windows code page %s (%s, %s)" cp ansioem name) + `(mnemonic + ,(format "MSW-%s" cp) + code-page ,cp + documentation + ,(format + "MS Windows Multibyte -- code page %s (%s, %s). This implements the encoding specified by code page %s. For more information on code pages, see `mswindows-charset-code-page'." - cp ansioem name cp)))))) + cp ansioem name cp))) + (define-coding-system-alias + (intern (format "cp%s" cp)) + (intern (format "windows-%s" cp))) + (coding-system-put (intern (format "windows-%s" cp)) 'category category)) + diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/mule-x-init.el --- a/lisp/mule/mule-x-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/mule-x-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -28,6 +28,7 @@ ;;; Work around what is arguably a Sun CDE bug. +;; #### This is unused, apparently. (defun x-use-halfwidth-roman-font (fullwidth-charset roman-registry) "Maybe set charset registry of the 'ascii charset to ROMAN-REGISTRY. @@ -50,18 +51,13 @@ (and width1 width2 (eq (+ width1 width1) width2))))) (when (eq 'x (device-type)) - (condition-case nil - (unless (twice-as-wide 'ascii fullwidth-charset) - (set-charset-registry 'ascii roman-registry) - (unless (twice-as-wide 'ascii fullwidth-charset) - ;; Restore if roman-registry didn't help - (set-charset-registry 'ascii "iso8859-1"))) - (error (set-charset-registry 'ascii "iso8859-1")))))) + (let ((original-registries (charset-registries 'ascii))) + (condition-case nil + (unless (twice-as-wide 'ascii fullwidth-charset) + (set-charset-registries 'ascii (vector roman-registry)) + (unless (twice-as-wide 'ascii fullwidth-charset) + ;; Restore if roman-registry didn't help + (set-charset-registries 'ascii original-registries))) + (error (set-charset-registries 'ascii original-registries))))))) ;;;; - -(defvar mule-x-win-initted nil) - -(defun init-mule-x-win () - "Initialize X Windows for MULE at startup. Don't call this." - ) diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/viet-util.el --- a/lisp/mule/viet-util.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/viet-util.el Sat Oct 25 21:40:46 2008 +0900 @@ -41,7 +41,13 @@ ;;;###autoload (defun viet-encode-viscii-char (char) "Return VISCII character code of CHAR if appropriate." - (get-char-table char viet-viscii-to-external-code-table)) + (check-argument-type #'characterp char) + (if (eq char ?~) + char + (setq char (encode-coding-string char 'viscii)) + (if (and (= 1 (length char)) + (not (eq (aref char 0) ?~))) + (aref char 0)))) ;; VIQR is a menmonic encoding specification for Vietnamese. ;; It represents diacritical marks by ASCII characters as follows: diff -r 71bf2c5667ba -r 66411359ce4e lisp/mule/vietnamese.el --- a/lisp/mule/vietnamese.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/mule/vietnamese.el Sat Oct 25 21:40:46 2008 +0900 @@ -60,275 +60,152 @@ long-name "VISCII upper-case" )) -(modify-syntax-entry 'vietnamese-viscii-lower "w") -(modify-syntax-entry 'vietnamese-viscii-upper "w") - (define-category ?v "Vietnamese character.") (modify-category-entry 'vietnamese-viscii-lower ?v) (modify-category-entry 'vietnamese-viscii-upper ?v) -(eval-and-compile - -(defvar viet-viscii-decode-table - [;; VISCII is a full 8-bit code. - 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15 - 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B - ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B - ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B - ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B - ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B - ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B - ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B - ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ] - "Vietnamese VISCII decoding table.") - -(defvar viet-viscii-encode-table - (let ((table-lower (make-vector 128 0)) - (table-upper (make-vector 128 0)) - (i 0) - char-component) - (while (< i 256) - (setq char-component - (split-char (aref viet-viscii-decode-table i))) - (cond ((eq (car char-component) 'vietnamese-viscii-lower) - (aset table-lower (nth 1 char-component) i)) - ((eq (car char-component) 'vietnamese-viscii-upper) - (aset table-upper (nth 1 char-component) i))) - (setq i (1+ i))) - (cons table-lower table-upper)) - "Vietnamese VISCII encoding table. -Cons of tables for encoding lower-case chars and upper-case characters. -Both tables are indexed by the position code of Vietnamese characters.") - -(defvar viet-vscii-decode-table - [;; VSCII is a full 8-bit code. - 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15 - 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31 - 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 - 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 - 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 - 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 - ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B - ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B - 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1>(B ?,1y(B ?,1p(B ?,2"(B - 192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B - ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B - ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B - ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B - ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B] - "Vietnamese VSCII decoding table.") - -(defvar viet-vscii-encode-table - (let ((table-lower (make-vector 128 0)) - (table-upper (make-vector 128 0)) - (i 0) - char-component) - (while (< i 256) - (setq char-component - (split-char (aref viet-vscii-decode-table i))) - (cond ((eq (car char-component) 'vietnamese-viscii-lower) - (aset table-lower (nth 1 char-component) i)) - ((eq (car char-component) 'vietnamese-viscii-upper) - (aset table-upper (nth 1 char-component) i))) - (setq i (1+ i))) - (cons table-lower table-upper)) - "Vietnamese VSCII encoding table. -Cons of tables for encoding lower-case chars and upper-case characters. -Both tables are indexed by the position code of Vietnamese characters.") - -) - -(define-ccl-program ccl-decode-viscii - `(3 - ((read r0) - (loop - (write-read-repeat r0 ,viet-viscii-decode-table)) - )) - "CCL program to decode VISCII 1.1") - -;; Multibyte form of a Vietnamese character is as follows (3-byte): -;; LEADING-CODE-PRIVATE-11 LEADING-CODE-EXTENDED-11 POSITION-CODE -;; where LEADING-CODE-EXTENDED-11 for Vietnamese is -;; `vietnamese-viscii-lower' or `vietnamese-viscii-upper'. - -(defvar leading-code-private-11 #x9E) - -(define-ccl-program ccl-encode-viscii - `(1 - ((read r0) - (loop - (if (r0 < 128) - ;; ASCII - (write-read-repeat r0) - ;; not ASCII - (if (r0 != ,leading-code-private-11) - ;; not Vietnamese - (write-read-repeat r0) - ((read-if (r0 == ,(charset-id 'vietnamese-viscii-lower)) - (;; Vietnamese lower - (read r0) - (r0 -= 128) - (write-read-repeat r0 ,(car viet-viscii-encode-table))) - (if (r0 == ,(charset-id 'vietnamese-viscii-upper)) - (;; Vietnamese upper - (read r0) - (r0 -= 128) - (write-read-repeat r0 ,(cdr viet-viscii-encode-table))) - ;; not Vietnamese - (write-read-repeat r0))))))))) - "CCL program to encode VISCII 1.1") - -(define-ccl-program ccl-encode-viscii-font - `(0 - ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper - ;; R1:position code - ;; Out: R1:font code point - (if (r0 == ,(charset-id 'vietnamese-viscii-lower)) - (r1 = r1 ,(car viet-viscii-encode-table)) - (r1 = r1 ,(cdr viet-viscii-encode-table))) - ) - "CCL program to encode Vietnamese chars to VISCII 1.1 font") - -(define-ccl-program ccl-decode-vscii - `(3 - ((read r0) - (loop - (write-read-repeat r0 ,viet-vscii-decode-table)) - )) - "CCL program to decode VSCII-1.") - -(define-ccl-program ccl-encode-vscii - `(1 - ((read r0) - (loop - (if (r0 < 128) - ;; ASCII - (write-read-repeat r0) - ;; not ASCII - (if (r0 != ,leading-code-private-11) - ;; not Vietnamese - (write-read-repeat r0) - (read-if (r0 == ,(charset-id 'vietnamese-viscii-lower)) - (;; Vietnamese lower - (read r0) - (r0 -= 128) - (write-read-repeat r0 ,(car viet-vscii-encode-table))) - (if (r0 == ,(charset-id 'vietnamese-viscii-upper)) - (;; Vietnamese upper - (read r0) - (r0 -= 128) - (write-read-repeat r0 ,(cdr viet-vscii-encode-table))) - ;; not Vietnamese - (write-read-repeat r0)))))))) - "CCL program to encode VSCII-1.") - -(define-ccl-program ccl-encode-vscii-font - `(0 - ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper - ;; R1:position code - ;; Out: R1:font code point - (if (r0 == ,(charset-id 'vietnamese-viscii-lower)) - (r1 = r1 ,(car viet-vscii-encode-table)) - (r1 = r1 ,(cdr viet-vscii-encode-table))) - ) - "CCL program to encode Vietnamese chars to VSCII-1 font.") - - -(make-coding-system - 'viscii 'ccl +(make-8-bit-coding-system + 'viscii + '((#x02 ?\u1EB2) ;; CAPITAL LETTER A WITH BREVE AND HOOK ABOVE + (#x05 ?\u1EB4) ;; CAPITAL LETTER A WITH BREVE AND TILDE + (#x06 ?\u1EAA) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE + (#x14 ?\u1EF6) ;; CAPITAL LETTER Y WITH HOOK ABOVE + (#x19 ?\u1EF8) ;; CAPITAL LETTER Y WITH TILDE + (#x1E ?\u1EF4) ;; CAPITAL LETTER Y WITH DOT BELOW + (#x80 ?\u1EA0) ;; CAPITAL LETTER A WITH DOT BELOW + (#x81 ?\u1EAE) ;; CAPITAL LETTER A WITH BREVE AND ACUTE + (#x82 ?\u1EB0) ;; CAPITAL LETTER A WITH BREVE AND GRAVE + (#x83 ?\u1EB6) ;; CAPITAL LETTER A WITH BREVE AND DOT BELOW + (#x84 ?\u1EA4) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE + (#x85 ?\u1EA6) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE + (#x86 ?\u1EA8) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE + (#x87 ?\u1EAC) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW + (#x88 ?\u1EBC) ;; CAPITAL LETTER E WITH TILDE + (#x89 ?\u1EB8) ;; CAPITAL LETTER E WITH DOT BELOW + (#x8A ?\u1EBE) ;; CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE + (#x8B ?\u1EC0) ;; CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE + (#x8C ?\u1EC2) ;; CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE + (#x8D ?\u1EC4) ;; CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE + (#x8E ?\u1EC6) ;; CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW + (#x8F ?\u1ED0) ;; CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE + (#x90 ?\u1ED2) ;; CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE + (#x91 ?\u1ED4) ;; CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE + (#x92 ?\u1ED6) ;; CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE + (#x93 ?\u1ED8) ;; CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW + (#x94 ?\u1EE2) ;; CAPITAL LETTER O WITH HORN AND DOT BELOW + (#x95 ?\u1EDA) ;; CAPITAL LETTER O WITH HORN AND ACUTE + (#x96 ?\u1EDC) ;; CAPITAL LETTER O WITH HORN AND GRAVE + (#x97 ?\u1EDE) ;; CAPITAL LETTER O WITH HORN AND HOOK ABOVE + (#x98 ?\u1ECA) ;; CAPITAL LETTER I WITH DOT BELOW + (#x99 ?\u1ECE) ;; CAPITAL LETTER O WITH HOOK ABOVE + (#x9A ?\u1ECC) ;; CAPITAL LETTER O WITH DOT BELOW + (#x9B ?\u1EC8) ;; CAPITAL LETTER I WITH HOOK ABOVE + (#x9C ?\u1EE6) ;; CAPITAL LETTER U WITH HOOK ABOVE + (#x9D ?\u0168) ;; CAPITAL LETTER U WITH TILDE + (#x9E ?\u1EE4) ;; CAPITAL LETTER U WITH DOT BELOW + (#x9F ?\u1EF2) ;; CAPITAL LETTER Y WITH GRAVE + (#xA0 ?\u00D5) ;; CAPITAL LETTER O WITH TILDE + (#xA1 ?\u1EAF) ;; SMALL LETTER A WITH BREVE AND ACUTE + (#xA2 ?\u1EB1) ;; SMALL LETTER A WITH BREVE AND GRAVE + (#xA3 ?\u1EB7) ;; SMALL LETTER A WITH BREVE AND DOT BELOW + (#xA4 ?\u1EA5) ;; SMALL LETTER A WITH CIRCUMFLEX AND ACUTE + (#xA5 ?\u1EA7) ;; SMALL LETTER A WITH CIRCUMFLEX AND GRAVE + (#xA6 ?\u1EA8) ;; CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE + (#xA7 ?\u1EAD) ;; SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW + (#xA8 ?\u1EBD) ;; SMALL LETTER E WITH TILDE + (#xA9 ?\u1EB9) ;; SMALL LETTER E WITH DOT BELOW + (#xAA ?\u1EBF) ;; SMALL LETTER E WITH CIRCUMFLEX AND ACUTE + (#xAB ?\u1EC1) ;; SMALL LETTER E WITH CIRCUMFLEX AND GRAVE + (#xAC ?\u1EC3) ;; SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE + (#xAD ?\u1EC5) ;; SMALL LETTER E WITH CIRCUMFLEX AND TILDE + (#xAE ?\u1EC7) ;; SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW + (#xAF ?\u1ED1) ;; SMALL LETTER O WITH CIRCUMFLEX AND ACUTE + (#xB0 ?\u1ED3) ;; SMALL LETTER O WITH CIRCUMFLEX AND GRAVE + (#xB1 ?\u1ED5) ;; SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE + (#xB2 ?\u1ED7) ;; SMALL LETTER O WITH CIRCUMFLEX AND TILDE + (#xB3 ?\u1EE0) ;; CAPITAL LETTER O WITH HORN AND TILDE + (#xB4 ?\u01A0) ;; CAPITAL LETTER O WITH HORN + (#xB5 ?\u1ED9) ;; SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW + (#xB6 ?\u1EDD) ;; SMALL LETTER O WITH HORN AND GRAVE + (#xB7 ?\u1EDF) ;; SMALL LETTER O WITH HORN AND HOOK ABOVE + (#xB8 ?\u1ECB) ;; SMALL LETTER I WITH DOT BELOW + (#xB9 ?\u1EF0) ;; CAPITAL LETTER U WITH HORN AND DOT BELOW + (#xBA ?\u1EE8) ;; CAPITAL LETTER U WITH HORN AND ACUTE + (#xBB ?\u1EEA) ;; CAPITAL LETTER U WITH HORN AND GRAVE + (#xBC ?\u1EEC) ;; CAPITAL LETTER U WITH HORN AND HOOK ABOVE + (#xBD ?\u01A1) ;; SMALL LETTER O WITH HORN + (#xBE ?\u1EDB) ;; SMALL LETTER O WITH HORN AND ACUTE + (#xBF ?\u01AF) ;; CAPITAL LETTER U WITH HORN + (#xC0 ?\u00C0) ;; CAPITAL LETTER A WITH GRAVE + (#xC1 ?\u00C1) ;; CAPITAL LETTER A WITH ACUTE + (#xC2 ?\u00C2) ;; CAPITAL LETTER A WITH CIRCUMFLEX + (#xC3 ?\u00C3) ;; CAPITAL LETTER A WITH TILDE + (#xC4 ?\u1EA2) ;; CAPITAL LETTER A WITH HOOK ABOVE + (#xC5 ?\u0102) ;; CAPITAL LETTER A WITH BREVE + (#xC6 ?\u1EB3) ;; SMALL LETTER A WITH BREVE AND HOOK ABOVE + (#xC7 ?\u1EB5) ;; SMALL LETTER A WITH BREVE AND TILDE + (#xC8 ?\u00C8) ;; CAPITAL LETTER E WITH GRAVE + (#xC9 ?\u00C9) ;; CAPITAL LETTER E WITH ACUTE + (#xCA ?\u00CA) ;; CAPITAL LETTER E WITH CIRCUMFLEX + (#xCB ?\u1EBA) ;; CAPITAL LETTER E WITH HOOK ABOVE + (#xCC ?\u00CC) ;; CAPITAL LETTER I WITH GRAVE + (#xCD ?\u00CD) ;; CAPITAL LETTER I WITH ACUTE + (#xCE ?\u0128) ;; CAPITAL LETTER I WITH TILDE + (#xCF ?\u1EF3) ;; SMALL LETTER Y WITH GRAVE + (#xD0 ?\u0110) ;; CAPITAL LETTER D WITH STROKE + (#xD1 ?\u1EE9) ;; SMALL LETTER U WITH HORN AND ACUTE + (#xD2 ?\u00D2) ;; CAPITAL LETTER O WITH GRAVE + (#xD3 ?\u00D3) ;; CAPITAL LETTER O WITH ACUTE + (#xD4 ?\u00D4) ;; CAPITAL LETTER O WITH CIRCUMFLEX + (#xD5 ?\u1EA1) ;; SMALL LETTER A WITH DOT BELOW + (#xD6 ?\u1EF7) ;; SMALL LETTER Y WITH HOOK ABOVE + (#xD7 ?\u1EEB) ;; SMALL LETTER U WITH HORN AND GRAVE + (#xD8 ?\u1EED) ;; SMALL LETTER U WITH HORN AND HOOK ABOVE + (#xD9 ?\u00D9) ;; CAPITAL LETTER U WITH GRAVE + (#xDA ?\u00DA) ;; CAPITAL LETTER U WITH ACUTE + (#xDB ?\u1EF9) ;; SMALL LETTER Y WITH TILDE + (#xDC ?\u1EF5) ;; SMALL LETTER Y WITH DOT BELOW + (#xDD ?\u00DD) ;; CAPITAL LETTER Y WITH ACUTE + (#xDE ?\u1EE1) ;; SMALL LETTER O WITH HORN AND TILDE + (#xDF ?\u01B0) ;; SMALL LETTER U WITH HORN + (#xE0 ?\u00E0) ;; SMALL LETTER A WITH GRAVE + (#xE1 ?\u00E1) ;; SMALL LETTER A WITH ACUTE + (#xE2 ?\u00E2) ;; SMALL LETTER A WITH CIRCUMFLEX + (#xE3 ?\u00E3) ;; SMALL LETTER A WITH TILDE + (#xE4 ?\u1EA3) ;; SMALL LETTER A WITH HOOK ABOVE + (#xE5 ?\u0103) ;; SMALL LETTER A WITH BREVE + (#xE6 ?\u1EEF) ;; SMALL LETTER U WITH HORN AND TILDE + (#xE7 ?\u1EAB) ;; SMALL LETTER A WITH CIRCUMFLEX AND TILDE + (#xE8 ?\u00E8) ;; SMALL LETTER E WITH GRAVE + (#xE9 ?\u00E9) ;; SMALL LETTER E WITH ACUTE + (#xEA ?\u00EA) ;; SMALL LETTER E WITH CIRCUMFLEX + (#xEB ?\u1EBB) ;; SMALL LETTER E WITH HOOK ABOVE + (#xEC ?\u00EC) ;; SMALL LETTER I WITH GRAVE + (#xED ?\u00ED) ;; SMALL LETTER I WITH ACUTE + (#xEE ?\u0129) ;; SMALL LETTER I WITH TILDE + (#xEF ?\u1EC9) ;; SMALL LETTER I WITH HOOK ABOVE + (#xF0 ?\u0111) ;; SMALL LETTER D WITH STROKE + (#xF1 ?\u1EF1) ;; SMALL LETTER U WITH HORN AND DOT BELOW + (#xF2 ?\u00F2) ;; SMALL LETTER O WITH GRAVE + (#xF3 ?\u00F3) ;; SMALL LETTER O WITH ACUTE + (#xF4 ?\u00F4) ;; SMALL LETTER O WITH CIRCUMFLEX + (#xF5 ?\u00F5) ;; SMALL LETTER O WITH TILDE + (#xF6 ?\u1ECF) ;; SMALL LETTER O WITH HOOK ABOVE + (#xF7 ?\u1ECD) ;; SMALL LETTER O WITH DOT BELOW + (#xF8 ?\u1EE5) ;; SMALL LETTER U WITH DOT BELOW + (#xF9 ?\u00F9) ;; SMALL LETTER U WITH GRAVE + (#xFA ?\u00FA) ;; SMALL LETTER U WITH ACUTE + (#xFB ?\u0169) ;; SMALL LETTER U WITH TILDE + (#xFC ?\u1EE7) ;; SMALL LETTER U WITH HOOK ABOVE + (#xFD ?\u00FD) ;; SMALL LETTER Y WITH ACUTE + (#xFE ?\u1EE3) ;; SMALL LETTER O WITH HORN AND DOT BELOW + (#xFF ?\u1EEE)) ;; CAPITAL LETTER U WITH HORN AND TILDE "VISCII 1.1 (Vietnamese)" - `(mnemonic "VISCII" - decode ccl-decode-viscii - encode ccl-encode-viscii)) - -;; it is not correct, but XEmacs doesn't have `ccl' category... -(coding-system-put 'viscii 'category 'iso-8-1) - -;; (make-coding-system -;; 'vietnamese-viscii 4 ?V -;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)" -;; '(ccl-decode-viscii . ccl-encode-viscii) -;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) -;; (mime-charset . viscii) -;; (valid-codes (0 . 255)))) - -;; (define-coding-system-alias 'viscii 'vietnamese-viscii) - -(make-coding-system - 'vscii 'ccl - "VSCII 1.1 (Vietnamese)" - `(mnemonic "VSCII" - decode ccl-decode-vscii - encode ccl-encode-vscii)) - -;; (make-coding-system -;; 'vietnamese-vscii 4 ?v -;; "8-bit encoding for Vietnamese VSCII-1" -;; '(ccl-decode-vscii . ccl-encode-vscii) -;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) -;; (valid-codes (0 . 255)))) - -;; (define-coding-system-alias 'vscii 'vietnamese-vscii) - -(make-coding-system - 'viqr 'no-conversion - "VIQR (Vietnamese)" - '(mnemonic "VIQR" - eol-type lf - post-read-conversion viqr-post-read-conversion - pre-write-conversion viqr-pre-write-conversion)) - -;; (make-coding-system -;; 'vietnamese-viqr 0 ?q -;; "Vietnamese latin transcription (VIQR)" -;; nil -;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) -;; (post-read-conversion . viqr-post-read-conversion) -;; (pre-write-conversion . viqr-pre-write-conversion) -;; (charset-origin-alist -;; (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char) -;; (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char)))) - -;; (define-coding-system-alias 'viqr 'vietnamese-viqr) - -;; For VISCII users -(set-charset-ccl-program 'vietnamese-viscii-lower - 'ccl-encode-viscii-font) -(set-charset-ccl-program 'vietnamese-viscii-upper - 'ccl-encode-viscii-font) -;; For VSCII users -(set-charset-ccl-program 'vietnamese-viscii-lower 'ccl-encode-vscii-font) -(set-charset-ccl-program 'vietnamese-viscii-upper 'ccl-encode-vscii-font) - -;; (setq font-ccl-encoder-alist -;; (cons (cons "viscii" ccl-encode-viscii-font) font-ccl-encoder-alist)) - -;; (setq font-ccl-encoder-alist -;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist)) - -(defvar viet-viscii-to-external-code-table - (let ((table (make-char-table 'generic)) - (i 0) - (len (length viet-viscii-decode-table))) - (while (< i len) - (let ((ch (aref viet-viscii-decode-table i))) - (if (characterp ch) - (put-char-table ch i table))) - (incf i))) - "Table to convert from characters to their VISCII code.") + '(mnemonic "VISCII")) (set-language-info-alist "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper) - (coding-system viscii vscii viqr) + (coding-system viscii) (coding-priority viscii) (locale "vietnamese" "vi") ;; Not available in packages. diff -r 71bf2c5667ba -r 66411359ce4e lisp/newcomment.el --- a/lisp/newcomment.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/newcomment.el Sat Oct 25 21:40:46 2008 +0900 @@ -240,7 +240,7 @@ (substring comment-start 1))) ;; Hasn't been necessary yet. ;; (unless (string-match comment-start-skip comment-continue) - ;; (kill-local-variable 'comment-continue)) + ;; (kill-local-variable 'comment-continue)) ) ;; comment-skip regexps (unless (and comment-start-skip @@ -443,12 +443,12 @@ ; (save-excursion ; (beginning-of-line) ; (let ((eol (save-excursion (end-of-line) (point)))) -; (and comment-start-skip -; (re-search-forward comment-start-skip eol t) -; (setq eol (match-beginning 0))) -; (goto-char eol) -; (skip-chars-backward " \t") -; (max comment-column (1+ (current-column)))))) +; (and comment-start-skip +; (re-search-forward comment-start-skip eol t) +; (setq eol (match-beginning 0))) +; (goto-char eol) +; (skip-chars-backward " \t") +; (max comment-column (1+ (current-column)))))) ; "Function to compute desired indentation for a comment. ; This function is called with no args with point at the beginning of ; the comment's starting delimiter.") @@ -498,7 +498,8 @@ (setq begpos (point)) ;; Ensure there's a space before the comment for things ;; like sh where it matters (as well as being neater). - (unless (eq ?\ (char-syntax (char-before))) + ;; ... but unless we're at the beginning of a line -- dvl + (unless (or (bolp) (eq ?\ (char-syntax (char-before)))) (insert ?\ )) (insert starter) (setq cpos (point-marker)) @@ -516,8 +517,8 @@ (+ (current-column) (- (or comment-fill-column fill-column) (save-excursion (end-of-line) (current-column))))))) - ;; XEmacs change: Preserve indentation of comments starting in - ;; column 0, as documented. + ;; XEmacs change: Preserve indentation of comments starting in + ;; column 0, as documented. (unless (or (= (current-column) 0) (= (current-column) indent)) ;; If that's different from current, change it. (delete-region (point) (progn (skip-chars-backward " \t") (point))) @@ -653,21 +654,21 @@ (setq end (copy-marker end)) (let* ((numarg (prefix-numeric-value arg)) - (ccs comment-continue) - (srei (comment-padright ccs 're)) - (sre (and srei (concat "^\\s-*?\\(" srei "\\)"))) - spt) + (ccs comment-continue) + (srei (comment-padright ccs 're)) + (sre (and srei (concat "^\\s-*?\\(" srei "\\)"))) + spt) (while (and (< (point) end) (setq spt (comment-search-forward end t))) (let ((ipt (point)) - ;; Find the end of the comment. - (ept (progn - (goto-char spt) - (unless (comment-forward) - (error "Can't find the comment end")) - (point))) - (box nil) - (box-equal nil)) ;Whether we might be using `=' for boxes. + ;; Find the end of the comment. + (ept (progn + (goto-char spt) + (unless (comment-forward) + (error "Can't find the comment end")) + (point))) + (box nil) + (box-equal nil)) ;Whether we might be using `=' for boxes. (save-restriction (narrow-to-region spt ept) @@ -1097,6 +1098,7 @@ (point)) nil t))))) (comment-start comstart) + (block-comment-start comment-start) (continuep (or comment-multi-line (cadr (assoc comment-style comment-styles)))) ;; Force comment-continue to be recreated from comment-start. diff -r 71bf2c5667ba -r 66411359ce4e lisp/objects.el --- a/lisp/objects.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/objects.el Sat Oct 25 21:40:46 2008 +0900 @@ -186,12 +186,12 @@ Valid instantiators for face-boolean specifiers are -- t or nil --- a vector of two or three elements: a face to inherit from, +-- a vector of one, two or three elements: a face to inherit from, optionally a symbol naming the property of that face to inherit from (if omitted, defaults to the same property that this face-boolean specifier is used for; if this specifier is not part of a face, the instantiator would not be valid), and optionally a value which, if non-nil, means to invert the sense of the inherited property." - (make-specifier-and-init 'color spec-list)) + (make-specifier-and-init 'face-boolean spec-list)) ;;; objects.el ends here. diff -r 71bf2c5667ba -r 66411359ce4e lisp/obsolete.el --- a/lisp/obsolete.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/obsolete.el Sat Oct 25 21:40:46 2008 +0900 @@ -225,20 +225,26 @@ (defun add-menu-item (menu-path item-name function enabled-p &optional before) "Obsolete. See the function `add-menu-button'." (or item-name (error "must specify an item name")) - (add-menu-button menu-path (vector item-name function enabled-p) before)) + (declare-fboundp (add-menu-button menu-path (vector item-name function enabled-p) before))) (make-obsolete 'add-menu-item 'add-menu-button) (defun add-menu (menu-path menu-name menu-items &optional before) "See the function `add-submenu'." (or menu-name (error "must specify a menu name")) (or menu-items (error "must specify some menu items")) - (add-submenu menu-path (cons menu-name menu-items) before)) + (declare-fboundp (add-submenu menu-path (cons menu-name menu-items) before))) ;; Can't make this obsolete. easymenu depends on it. (make-compatible 'add-menu 'add-submenu) (define-obsolete-function-alias 'package-get-download-menu 'package-ui-download-menu) +(unless (featurep 'menubar) + ;; Don't provide the last three functions unless the menubar feature is + ;; available. This approach (with #'unintern) avoids warnings about lost + ;; docstrings since make-docfile doesn't parse bytecode. + (mapcar #'unintern '(add-menu-item add-menu package-get-download-menu))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer (define-compatible-function-alias 'read-minibuffer @@ -345,7 +351,7 @@ "Return a list of charsets in the STRING except ascii. It might be available for compatibility with Mule 2.3, because its `find-charset-string' ignores ASCII charset." - (delq 'ascii (charsets-in-string string))) + (delq 'ascii (and-fboundp #'charsets-in-string (charsets-in-string string)))) (make-obsolete 'find-non-ascii-charset-string "use (delq 'ascii (charsets-in-string STRING)) instead.") @@ -353,7 +359,8 @@ "Return a list of charsets except ascii in the region between START and END. It might be available for compatibility with Mule 2.3, because its `find-charset-string' ignores ASCII charset." - (delq 'ascii (charsets-in-region start end))) + (delq 'ascii (and-fboundp #'charsets-in-region + (charsets-in-region start end)))) (make-obsolete 'find-non-ascii-charset-region "use (delq 'ascii (charsets-in-region START END)) instead.") diff -r 71bf2c5667ba -r 66411359ce4e lisp/occur.el --- a/lisp/occur.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/occur.el Sat Oct 25 21:40:46 2008 +0900 @@ -467,9 +467,9 @@ (setq marker (make-marker)) (set-marker marker matchbeg) (if (and keep-props - (if (boundp 'jit-lock-mode) jit-lock-mode) + (if-boundp 'jit-lock-mode jit-lock-mode) (text-property-not-all begpt endpt 'fontified t)) - (if (fboundp 'jit-lock-fontify-now) + (if-fboundp #'jit-lock-fontify-now (jit-lock-fontify-now begpt endpt))) (setq curstring (buffer-substring begpt endpt)) ;; Depropertize the string, and maybe diff -r 71bf2c5667ba -r 66411359ce4e lisp/package-get.el --- a/lisp/package-get.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/package-get.el Sat Oct 25 21:40:46 2008 +0900 @@ -220,44 +220,44 @@ ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/packages") ("Brazil (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/packages") ("Canada (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/packages") - ("Canada (crc.ca)" "ftp.crc.ca" "pub/packages/editors/xemacs/packages") ("Canada (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/packages") + ;; no anonymous ftp available, uncomment when updating website + ;; with + ;; xemacs-builds/adrian/website/package-get-2-download-sites.el +; ("Chile (cl.xemacs.org)" "ftp.cl.xemacs.org" "packages") + ("China (ftp.cn.xemacs.org)" "ftp.cn.xemacs.org" "pub/xemacs/packages") ("Czech Republic (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/packages") - ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "pub/emacs/xemacs/packages") + ("Denmark (dk.xemacs.org)" "ftp.dk.xemacs.org" "xemacs/packages") ("Finland (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/packages") ("France (fr.xemacs.org)" "ftp.fr.xemacs.org" "pub/xemacs/packages") ("France (mirror.cict.fr)" "mirror.cict.fr" "xemacs/packages") ("France (pasteur.fr)" "ftp.pasteur.fr" "pub/computing/xemacs/packages") ("Germany (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/packages") + ("Greece (gr.xemacs.org)" "ftp.gr.xemacs.org" "mirrors/XEmacs/ftp/packages") ("Hong Kong (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/packages") - ("Iceland (is.xemacs.org)" "ftp.is.xemacs.org" "pub/xemacs/packages") ("Ireland (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/packages") ("Ireland (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/packages") ("Italy (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/packages") - ("Japan (aist.go.jp)" "ring.aist.go.jp" "pub/text/xemacs/packages") - ("Japan (asahi-net.or.jp)" "ring.asahi-net.or.jp" "pub/text/xemacs/packages") ("Japan (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/packages") ; ("Japan (jaist.ac.jp)" "ftp.jaist.ac.jp" "pub/GNU/xemacs/packages") -; ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/GNU/xemacs/packages") + ("Japan (jp.xemacs.org)" "ftp.jp.xemacs.org" "pub/text/xemacs/packages") ; ("Japan (nucba.ac.jp)" "mirror.nucba.ac.jp" "mirror/xemacs/packages") - ("Japan (sut.ac.jp)" "sunsite.sut.ac.jp" "pub/archives/packages/xemacs/packages") ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/packages") ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/packages") - ("New Zealand (nz.xemacs.org)" "ftp.nz.xemacs.org" "mirror/ftp.xemacs.org/packages") + ;; no anonymous ftp available, uncomment when updating website + ;; with + ;; xemacs-builds/adrian/website/package-get-2-download-sites.el +; ("Netherlands (xemacsftp.digimirror.nl)" "xemacsftp.digimirror.nl" "packages") ("Norway (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/packages") - ("Poland (pl.xemacs.org)" "ftp.pl.xemacs.org" "pub/unix/editors/xemacs/packages") ("Portugal (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/packages") ("Russia (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/packages") -; ("South Africa (za.xemacs.org)" "ftp.za.xemacs.org" "mirrorsites/ftp.xemacs.org/packages") + ("Saudi Arabia (sa.xemacs.org)" "ftp.sa.xemacs.org" "pub/xemacs.org/packages") ("Sweden (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/packages") ("Switzerland (ch.xemacs.org)" "ftp.ch.xemacs.org" "mirror/xemacs/packages") ("Taiwan (ftp.tw.xemacs.org)" "ftp.tw.xemacs.org" "Unix/Editors/XEmacs/packages") ("UK (uk.xemacs.org)" "ftp.uk.xemacs.org" "sites/ftp.xemacs.org/pub/xemacs/packages") ("US (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/packages") - ("US (stealth.net)" "ftp.stealth.net" "pub/mirrors/ftp.xemacs.org/pub/xemacs/packages") - ("US (unc.edu)" "metalab.unc.edu" "pub/packages/editors/xemacs/packages") - ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/xemacs/packages") -; ("US (utk.edu)" "ftp.sunsite.utk.edu" "pub/xemacs/packages") + ("US (us.xemacs.org)" "ftp.us.xemacs.org" "pub/mirrors/xemacs/packages") ) "*List of remote sites available for downloading packages. List format is '(site-description site-name directory-on-site). @@ -285,20 +285,25 @@ "pub/xemacs/beta/experimental/packages") ("Austria Pre-Releases (at.xemacs.org)" "ftp.at.xemacs.org" "editors/xemacs/beta/experimental/packages") - ("Belgium (be.xemacs.org)" "ftp.be.xemacs.org" + ("Belgium Pre-Releases (be.xemacs.org)" "ftp.be.xemacs.org" "xemacs/beta/experimental/packages") ("Brazil Pre-Releases (br.xemacs.org)" "ftp.br.xemacs.org" "pub/xemacs/xemacs-21.5/experimental/packages") ("Canada Pre-Releases (ca.xemacs.org)" "ftp.ca.xemacs.org" "pub/Mirror/xemacs/beta/experimental/packages") - ("Canada Pre-Releases (crc.ca)" "ftp.crc.ca" - "pub/packages/editors/xemacs/beta/experimental/packages") ("Canada Pre-Releases (nrc.ca)" "ftp.nrc.ca" "pub/packages/editors/xemacs/beta/experimental/packages") + ;; no anonymous ftp available, uncomment when updating website + ;; with + ;; xemacs-builds/adrian/website/package-get-2-download-sites.el +; ("Chile Pre-Releases (cl.xemacs.org)" "ftp.cl.xemacs.org" +; "beta/experimental/packages") + ("China Pre-Releases (ftp.cn.xemacs.org)" "ftp.cn.xemacs.org" + "pub/xemacs/beta/experimental/packages") ("Czech Republic Pre-Releases (cz.xemacs.org)" "ftp.cz.xemacs.org" "MIRRORS/ftp.xemacs.org/pub/xemacs/xemacs-21.5/experimental/packages") ("Denmark Pre-Releases (dk.xemacs.org)" "ftp.dk.xemacs.org" - "pub/emacs/xemacs/beta/experimental/packages") + "xemacs/beta/experimental/packages") ("Finland Pre-Releases (fi.xemacs.org)" "ftp.fi.xemacs.org" "pub/mirrors/ftp.xemacs.org/pub/tux/xemacs/beta/experimental/packages") ("France Pre-Releases (fr.xemacs.org)" "ftp.fr.xemacs.org" @@ -309,44 +314,39 @@ "pub/computing/xemacs/beta/experimental/packages") ("Germany Pre-Releases (de.xemacs.org)" "ftp.de.xemacs.org" "pub/ftp.xemacs.org/tux/xemacs/beta/experimental/packages") + ("Greece Pre-Releases (gr.xemacs.org)" "ftp.gr.xemacs.org" + "mirrors/XEmacs/ftp/beta/experimental/packages") ("Hong Kong Pre-Releases (hk.xemacs.org)" "ftp.hk.xemacs.org" "pub/xemacsftp/beta/experimental/packages") - ("Iceland Pre-Releases (is.xemacs.org)" "ftp.is.xemacs.org" - "pub/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (ie.xemacs.org)" "ftp.ie.xemacs.org" "mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("Ireland Pre-Releases (heanet.ie)" "ftp.heanet.ie" "mirrors/ftp.xemacs.org/beta/experimental/packages") ("Italy Pre-Releases (it.xemacs.org)" "ftp.it.xemacs.org" "unix/packages/XEMACS/beta/experimental/packages") - ("Japan Pre-Releases (aist.go.jp)" "ring.aist.go.jp" - "pub/text/xemacs/beta/experimental/packages") - ("Japan Pre-Releases (asahi-net.or.jp)" "ring.asahi-net.or.jp" - "pub/text/xemacs/beta/experimental/packages") ("Japan Pre-Releases (dti.ad.jp)" "ftp.dti.ad.jp" "pub/unix/editor/xemacs/beta/experimental/packages") ; ("Japan Pre-Releases (jaist.ac.jp)" "ftp.jaist.ac.jp" ; "pub/GNU/xemacs/beta/experimental/packages") -; ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" -; "pub/GNU/xemacs/beta/experimental/packages") - ("Japan Pre-Releases (sut.ac.jp)" "sunsite.sut.ac.jp" - "pub/archives/packages/xemacs/xemacs-21.5/experimental/packages") - ("Korea (kr.xemacs.org)" "ftp.kr.xemacs.org" + ("Japan Pre-Releases (jp.xemacs.org)" "ftp.jp.xemacs.org" + "pub/text/xemacs/beta/experimental/packages") + ("Korea Pre-Releases (kr.xemacs.org)" "ftp.kr.xemacs.org" "pub/tools/emacs/xemacs/beta/experimental/packages") - ("Netherlands (nl.xemacs.org)" "ftp.nl.xemacs.org" + ("Netherlands Pre-Releases (nl.xemacs.org)" "ftp.nl.xemacs.org" "pub/xemacs/ftp/beta/experimental/packages") - ("New Zealand Pre-Releases (nz.xemacs.org)" "ftp.nz.xemacs.org" - "mirror/ftp.xemacs.org/packages") + ;; no anonymous ftp available, uncomment when updating website + ;; with + ;; xemacs-builds/adrian/website/package-get-2-download-sites.el +; ("Netherlands Pre-Releases (xemacsftp.digimirror.nl)" "xemacsftp.digimirror.nl" +; "beta/experimental/packages") ("Norway Pre-Releases (no.xemacs.org)" "ftp.no.xemacs.org" "pub/xemacs/beta/experimental/packages") - ("Poland Pre-Releases (pl.xemacs.org)" "ftp.pl.xemacs.org" - "pub/unix/editors/xemacs/beta/experimental/packages") ("Portugal Pre-Releases (pt.xemacs.org)" "ftp.pt.xemacs.org" "pub/MIRRORS/ftp.xemacs.org/beta/experimental/packages") ("Russia Pre-Releases (ru.xemacs.org)" "ftp.ru.xemacs.org" "pub/emacs/xemacs/beta/experimental/packages") -; ("South Africa Pre-Releases (za.xemacs.org)" "ftp.za.xemacs.org" -; "mirrorsites/ftp.xemacs.org/beta/experimental/packages") + ("Saudi Arabia Pre-Releases (sa.xemacs.org)" "ftp.sa.xemacs.org" + "pub/xemacs.org/beta/experimental/packages") ("Sweden Pre-Releases (se.xemacs.org)" "ftp.se.xemacs.org" "pub/gnu/xemacs/beta/experimental/packages") ("Switzerland Pre-Releases (ch.xemacs.org)" "ftp.ch.xemacs.org" @@ -357,15 +357,9 @@ "sites/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") ("US Pre-Releases (ibiblio.org)" "mirrors.ibiblio.org" "pub/mirrors/xemacs/beta/experimental/packages") - ("US Pre-Releases (stealth.net)" "ftp.stealth.net" - "pub/mirrors/ftp.xemacs.org/pub/xemacs/beta/experimental/packages") - ("US Pre-Releases (unc.edu)" "metalab.unc.edu" - "pub/packages/editors/xemacs/beta/experimental/packages") ("US Pre-Releases (us.xemacs.org)" "ftp.us.xemacs.org" - "pub/xemacs/beta/experimental/packages") -; ("US Pre-Releases (utk.edu)" "ftp.sunsite.utk.edu" -; "pub/xemacs/beta/experimental/packages") -) + "pub/mirrors/xemacs/beta/experimental/packages") + ) "*List of remote sites available for downloading \"Pre-Release\" packages. List format is '(site-description site-name directory-on-site). SITE-DESCRIPTION is a textual description of the site. SITE-NAME @@ -413,50 +407,6 @@ :type 'boolean :group 'package-get) -(defun package-get-pgp-available-p () - "Checks the availability of Mailcrypt and PGP executable. - -Returns t if both are found, nil otherwise. As a side effect, set -`mc-default-scheme' dependent on the PGP executable found." - (let (result) - (when (featurep 'mailcrypt-autoloads) - (autoload 'mc-setversion "mc-setversion")) - (when-fboundp 'mc-setversion - (cond ((locate-file "gpg" exec-path - '("" ".btm" ".bat" ".cmd" ".exe" ".com") - 'executable) - (mc-setversion "gpg") - (setq result t)) - ((locate-file "pgpe" exec-path - '("" ".btm" ".bat" ".cmd" ".exe" ".com") - 'executable) - (mc-setversion "5.0") - (setq result t)) - ((locate-file "pgp" exec-path - '("" ".btm" ".bat" ".cmd" ".exe" ".com") - 'executable) - (mc-setversion "2.6") - (setq result t)))) - (if result - result - nil))) - -(defcustom package-get-require-signed-base-updates (package-get-pgp-available-p) - "*If non-nil, try to verify the package index database via PGP. - -If nil, no PGP verification is done. If the package index database -entries are not PGP signed and this variable is non-nil, require user -confirmation to continue with the package-get procedure. - -The default for this variable is the return value of -`package-get-pgp-available-p', non-nil if both the \"Mailcrypt\" -package and a suitable PGP executable are available, nil otherwise." - :type 'boolean - :group 'package-get) - -(defvar package-entries-are-signed nil - "Non-nil when the package index file has been PGP signed.") - (defvar package-get-continue-update-base nil "Non-nil update the index even if it hasn't been signed.") @@ -484,13 +434,6 @@ "Package-get database not loaded") (setq package-get-was-current force-current))) -(defconst package-get-pgp-signed-begin-line "^-----BEGIN PGP SIGNED MESSAGE-----" - "Text for start of PGP signed messages.") -(defconst package-get-pgp-signature-begin-line "^-----BEGIN PGP SIGNATURE-----" - "Text for beginning of PGP signature.") -(defconst package-get-pgp-signature-end-line "^-----END PGP SIGNATURE-----" - "Text for end of PGP signature.") - ;;;###autoload (defun package-get-update-base-entry (entry) "Update an entry in `package-get-base'." @@ -618,39 +561,8 @@ (goto-char (point-min)) (setq content-beg (point)) (setq content-end (save-excursion (goto-char (point-max)) (point))) - (when (re-search-forward package-get-pgp-signed-begin-line nil t) - (setq content-beg (match-end 0))) - (when (re-search-forward package-get-pgp-signature-begin-line nil t) - (setq content-end (match-beginning 0)) - (setq package-entries-are-signed t)) - (re-search-forward package-get-pgp-signature-end-line nil t) - (setq package-get-continue-update-base t) - ;; This is a little overkill because the default value of - ;; `package-get-require-signed-base-updates' is the return of - ;; `package-get-pgp-available-p', but we have to allow for - ;; someone explicitly setting - ;; `package-get-require-signed-base-updates' to t. --SY - (when (and package-get-require-signed-base-updates - (package-get-pgp-available-p)) - (if package-entries-are-signed - (let (good-sig) - (setq package-get-continue-update-base nil) - (autoload 'mc-verify "mc-toplev") - (when (declare-fboundp (mc-verify)) - (setq good-sig t)) - (if good-sig - (setq package-get-continue-update-base t) - (error 'process-error - "GnuPG error. Package database not updated"))) - (if (yes-or-no-p - "Package Index is not PGP signed. Continue anyway? ") - (setq package-get-continue-update-base t) - (setq package-get-continue-update-base nil) - (warn "Package database not updated")))) - ;; ToDo: We should call package-get-maybe-save-index on the region - (when package-get-continue-update-base - (package-get-update-base-entries content-beg content-end) - (message "Updated package database"))))) + (package-get-update-base-entries content-beg content-end) + (message "Updated package database")))) (defun package-get-update-base-entries (start end) "Update the package-get database with the entries found between diff -r 71bf2c5667ba -r 66411359ce4e lisp/packages.el --- a/lisp/packages.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/packages.el Sat Oct 25 21:40:46 2008 +0900 @@ -386,8 +386,8 @@ (defun packages-find-installation-package-directories (roots) "Find the package directories in the XEmacs installation. ROOTS is a list of installation roots." - (paths-uniq-append (paths-find-version-directories roots "" nil nil t) - (paths-find-site-directories roots ""))) + (paths-uniq-append (paths-find-version-directories roots (list "") nil nil nil t) + (paths-find-site-directories roots (list "") nil))) (defun packages-find-package-hierarchies (package-directories &optional envvar default) "Find package hierarchies in a list of package directories. diff -r 71bf2c5667ba -r 66411359ce4e lisp/paragraphs.el --- a/lisp/paragraphs.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/paragraphs.el Sat Oct 25 21:40:46 2008 +0900 @@ -240,13 +240,13 @@ ;; Search back for line that starts or separates paragraphs. (if (if fill-prefix-regexp ;; There is a fill prefix; it overrides parstart. - (let (multiple-lines) + (let nil ; (multiple-lines) (while (and (progn (beginning-of-line) (not (bobp))) (progn (move-to-left-margin) (not (looking-at parsep))) (looking-at fill-prefix-regexp)) - (unless (= (point) start) - (setq multiple-lines t)) + ; (unless (= (point) start) + ; (setq multiple-lines t)) (forward-line -1)) (move-to-left-margin) ;; This deleted code caused a long hanging-indent line @@ -319,7 +319,11 @@ (forward-char 1)) (if (< (point) (point-max)) (goto-char start)))) - (constrain-to-field nil opoint t) + (if-fboundp #'constrain-to-field + (constrain-to-field nil opoint t) + (error + 'void-function + "constrain-to-field not available; is xemacs-base installed?")) ;; Return the number of steps that could not be done. arg)) @@ -434,7 +438,11 @@ (skip-chars-backward " \t\n") (goto-char par-end))) (setq arg (1- arg))) - (constrain-to-field nil opoint t))) + (if-fboundp #'constrain-to-field + (constrain-to-field nil opoint t) + (error + 'void-function + "constrain-to-field not available; is xemacs-base installed?")))) (defun backward-sentence (&optional arg) "Move backward to start of sentence. With arg, do it arg times. diff -r 71bf2c5667ba -r 66411359ce4e lisp/printer.el --- a/lisp/printer.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/printer.el Sat Oct 25 21:40:46 2008 +0900 @@ -263,7 +263,7 @@ (let* ((print-region (and (interactive-p) (region-active-p))) (start (if print-region (region-beginning) (point-min buffer))) (end (if print-region (region-end) (point-max buffer)))) - (if (or (not (valid-specifier-tag-p 'msprinter)) + (if (or (not (valid-device-type-p 'msprinter)) (not display-print-dialog)) (generic-print-region start end buffer) (let* ((d (Printer-get-device)) @@ -312,7 +312,7 @@ to-page Last page to print, inclusive, If omitted, printing ends at the end. copies Number of copies to print. If omitted, one copy is printed." - (cond ((valid-specifier-tag-p 'msprinter) + (cond ((valid-device-type-p 'msprinter) ;; loop, printing one copy of document per loop. kill and ;; re-create the frame each time so that we eject the piece ;; of paper at the end even if we're printing more than one diff -r 71bf2c5667ba -r 66411359ce4e lisp/process.el --- a/lisp/process.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/process.el Sat Oct 25 21:40:46 2008 +0900 @@ -25,7 +25,7 @@ ;; Boston, MA 02111-1307, USA. ;;; Synched up with: FSF 19.30, except for setenv/getenv (synched with FSF -;;; 21.0.105). +;;; 21.2.1). ;;; Authorship: @@ -542,8 +542,10 @@ `$FOO' where FOO is an environment variable name means to substitute the value of that variable. The variable name should be terminated with a character not a letter, digit or underscore; otherwise, enclose -the entire variable name in braces. Use `$$' to insert a single -dollar sign." +the entire variable name in braces. For instance, in `ab$cd-x', +`$cd' is treated as an environment variable. + +Use `$$' to insert a single dollar sign." (let ((start 0)) (while (string-match ;; XEmacs change - FSF use their rx macro to generate this regexp @@ -575,19 +577,40 @@ Interactively, the current value (if any) of the variable appears at the front of the history list when you type in the new value. -This function works by modifying `process-environment'." +This function works by modifying `process-environment'. + +As a special case, setting variable `TZ' calls `set-time-zone-rule' as +a side-effect." (interactive (if current-prefix-arg (list (read-envvar-name "Clear environment variable: " 'exact) nil t) - (let ((var (read-envvar-name "Set environment variable: " nil))) + (let* ((var (read-envvar-name "Set environment variable: " nil)) + (value (getenv var))) + (when value + (push value setenv-history)) ;; Here finally we specify the args to call setenv with. (list var (read-from-minibuffer (format "Set %s to value: " var) nil nil nil 'setenv-history - (getenv var)))))) + ;; XEmacs change; don't specify a + ;; default. (Nor an abbrev table.) + ))))) (if unset (setq value nil) (if substitute-env-vars (setq value (substitute-env-vars value)))) + + ;; GNU fuck around with coding systems here. We do it at a much lower + ;; level; an equivalent of the following code of Handa's would be + ;; worthwhile here, though: + +; (let ((codings (find-coding-systems-string (concat variable value)))) +; (unless (or (eq 'undecided (car codings)) +; (memq (coding-system-base locale-coding-system) codings)) +; (error "Can't encode `%s=%s' with `locale-coding-system'" +; variable (or value ""))))) + + ;; But then right now our find-coding-systems analogue is in packages. + (if (string-match "=" variable) (error "Environment variable name `%s' contains `='" variable) (let ((pattern (concat "\\`" (regexp-quote (concat variable "=")))) @@ -626,6 +649,25 @@ ; (message "%s" (if value value "Not set"))) ; value)) + +;; GNU have an #'environment function here, as of 2007-12-14. If someone +;; actually uses it in the wild, this would suffice as an implementation: + +; (defun environment (&optional frame) +; "Return a list of environment variables with their values. +; Each entry in the list is a string of the form NAME=VALUE. +; +; Optional argument FRAME is ignored, for GNU compatibility. +; +; Non-ASCII characters look like Mojibake (that is, they are unreadable.)" +; (loop +; for entry in process-environment +; collect (encode-coding-string entry 'native))) +; + +;; but we shouldn't encourage that sort of ugliness and needless backwards +;; incompatibility. + (provide 'env) ;; Yuck. Formerly the above were in env.el, which did this ;; provide. diff -r 71bf2c5667ba -r 66411359ce4e lisp/select.el --- a/lisp/select.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/select.el Sat Oct 25 21:40:46 2008 +0900 @@ -276,7 +276,9 @@ ;; application asserts the selection. This is probably not a big deal. (defun activate-region-as-selection () - (cond (mouse-track-rectangle-p (mouse-track-activate-rectangular-selection)) + (cond ((and-fboundp #'mouse-track-rectangle-p + (mouse-track-rectangle-p + (mouse-track-activate-rectangular-selection)))) ((marker-buffer (mark-marker t)) (own-selection (cons (point-marker t) (mark-marker t)))))) @@ -346,10 +348,11 @@ (set-extent-property previous-extent 'end-open nil) (cond - (mouse-track-rectangle-p - (setq previous-extent (list previous-extent)) - (default-mouse-track-next-move-rect start end previous-extent) - )) + ((and-fboundp #'mouse-track-rectangle-p + (mouse-track-rectangle-p + (setq previous-extent (list previous-extent)) + (default-mouse-track-next-move-rect start end previous-extent) + )))) previous-extent)))) (defun valid-simple-selection-p (data) @@ -727,17 +730,17 @@ ((listp value) ; list (if (cdr value) - (mapcar '(lambda (x) - (select-convert-from-integer selection type x)) + (mapcar #'(lambda (x) + (select-convert-from-integer selection type x)) value) (select-convert-from-integer selection type (car value)))) ((vectorp value) ; vector (if (eq (length value) 1) (select-convert-from-integer selection type (aref value 0)) - (mapvector '(lambda (x) - (select-convert-from-integer selection type x)) - value))) + (mapvector #'(lambda (x) + (select-convert-from-integer selection type x)) + value))) (t nil) )) diff -r 71bf2c5667ba -r 66411359ce4e lisp/setup-paths.el --- a/lisp/setup-paths.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/setup-paths.el Sat Oct 25 21:40:46 2008 +0900 @@ -97,10 +97,10 @@ (or ;; installed (paths-file-readable-directory-p (paths-construct-path (list directory - "lib" + "share" emacs-program-name))) (paths-file-readable-directory-p (paths-construct-path (list directory - "lib" + "share" (construct-emacs-version-name)))) ;; in-place or windows-nt (and @@ -158,22 +158,22 @@ (defun paths-find-site-lisp-directory (roots) "Find the site Lisp directory of the XEmacs hierarchy. ROOTS is a list of installation roots." - (paths-find-site-directory roots "site-lisp" - nil + (paths-find-site-directory roots (list "site-lisp") + nil nil configure-site-directory)) (defun paths-find-site-module-directory (roots) "Find the site modules directory of the XEmacs hierarchy. ROOTS is a list of installation roots." - (paths-find-site-directory roots "site-modules" - nil + (paths-find-site-directory roots (list "site-modules") + t nil configure-site-module-directory)) (defun paths-find-lisp-directory (roots) "Find the main Lisp directory of the XEmacs hierarchy. ROOTS is a list of installation roots." - (paths-find-version-directory roots "lisp" - nil + (paths-find-version-directory roots (list "lisp") + nil nil configure-lisp-directory)) (defun paths-find-mule-lisp-directory (roots &optional lisp-directory) @@ -186,14 +186,14 @@ (paths-construct-path (list lisp-directory "mule"))))) (if (paths-file-readable-directory-p guess) guess - (paths-find-version-directory roots "mule-lisp" - nil + (paths-find-version-directory roots (list "mule-lisp") + nil nil configure-mule-lisp-directory))))) (defun paths-find-module-directory (roots) "Find the main modules directory of the XEmacs hierarchy. ROOTS is a list of installation roots." - (paths-find-architecture-directory roots "modules" + (paths-find-architecture-directory roots (list "modules") nil configure-module-directory)) (defun paths-construct-load-path @@ -264,8 +264,8 @@ (paths-uniq-append (append (let ((info-directory - (paths-find-version-directory roots "info" - nil + (paths-find-version-directory roots (list "info") + nil nil configure-info-directory))) (and info-directory (list info-directory))) @@ -282,12 +282,12 @@ (defun paths-find-doc-directory (roots) "Find the documentation directory. ROOTS is the list of installation roots." - (paths-find-architecture-directory roots "lib-src" nil configure-doc-directory)) + (paths-find-architecture-directory roots (list "lib-src") nil configure-doc-directory)) (defun paths-find-exec-directory (roots) "Find the binary directory. ROOTS is the list of installation roots." - (paths-find-architecture-directory roots "lib-src" + (paths-find-architecture-directory roots (list "lib-src") nil configure-exec-directory)) (defun paths-construct-exec-path (roots exec-directory @@ -319,7 +319,7 @@ (defun paths-find-data-directory (roots) "Find the data directory. ROOTS is the list of installation roots." - (paths-find-version-directory roots "etc" "EMACSDATA" configure-data-directory)) + (paths-find-version-directory roots (list "etc") nil "EMACSDATA" configure-data-directory)) (defun paths-construct-data-directory-list (data-directory early-package-hierarchies diff -r 71bf2c5667ba -r 66411359ce4e lisp/simple.el --- a/lisp/simple.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/simple.el Sat Oct 25 21:40:46 2008 +0900 @@ -782,13 +782,16 @@ done))) (- (buffer-size) (forward-line (buffer-size))))))) -(defun what-cursor-position () +(defun what-cursor-position (&optional detail) "Print info on cursor position (on screen and within buffer). Also describe the character after point, giving its UCS code point and Mule charset and codes; for ASCII characters, give its code in octal, decimal and -hex." - ;; XEmacs change - (interactive "_") +hex. + +With prefix argument, show extended details about the character in a +separate buffer. See also the command `describe-char'." + ;; XEmacs change "_" + (interactive "_P") (let* ((char (char-after (point))) ; XEmacs (beg (point-min)) (end (point-max)) @@ -813,6 +816,8 @@ (if (= pos end) (message "point=%d of %d(%d%%)%s column %d %s" pos total percent narrowed-details col hscroll) + (if detail + (describe-char (point))) ;; XEmacs: don't use single-key-description, treat non-ASCII ;; characters differently. (if (< char ?\x80) @@ -3433,10 +3438,13 @@ ;; ;; and hope for the best. Not code we want to use, IMO. +(defvar xemacs-default-composefunc-dont-nag nil + "Disable the `xemacs-default-composefunc' nagging; for bug reports.") + (defun xemacs-default-composefunc (&rest args) "Warn that the default mail-reading package is heinously underfeatured; compose a mail using it, all the same. " - (unless (noninteractive) + (unless (or noninteractive xemacs-default-composefunc-dont-nag) (warn " Defaulting to the GNU Emacs-derived `sendmail.el' mail client. This facility, @@ -3969,7 +3977,8 @@ (cond (zmacs-region-rectangular-p (setq zmacs-region-extent (list zmacs-region-extent)) - (default-mouse-track-next-move-rect start end zmacs-region-extent) + (when-fboundp #'default-mouse-track-next-move-rect + (default-mouse-track-next-move-rect start end zmacs-region-extent)) )) zmacs-region-extent))) @@ -3995,8 +4004,8 @@ nil (setq zmacs-region-active-p t zmacs-region-stays t - zmacs-region-rectangular-p (and (boundp 'mouse-track-rectangle-p) - mouse-track-rectangle-p)) + zmacs-region-rectangular-p (and-boundp 'mouse-track-rectangle-p + mouse-track-rectangle-p)) (if (marker-buffer (mark-marker t)) (zmacs-make-extent-for-region (cons (point-marker t) (mark-marker t)))) (run-hooks 'zmacs-activate-region-hook) diff -r 71bf2c5667ba -r 66411359ce4e lisp/specifier.el --- a/lisp/specifier.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/specifier.el Sat Oct 25 21:40:46 2008 +0900 @@ -605,15 +605,10 @@ ;; ;; from producing an error if no X support was compiled in. -(or (valid-specifier-tag-p 'x) - (define-specifier-tag 'x (lambda (dev) (eq (device-type dev) 'x)))) -(or (valid-specifier-tag-p 'tty) - (define-specifier-tag 'tty (lambda (dev) (eq (device-type dev) 'tty)))) -(or (valid-specifier-tag-p 'mswindows) - (define-specifier-tag 'mswindows (lambda (dev) - (eq (device-type dev) 'mswindows)))) -(or (valid-specifier-tag-p 'gtk) - (define-specifier-tag 'gtk (lambda (dev) (eq (device-type dev) 'gtk)))) +(loop + for tag in '(x tty mswindows msprinter gtk carbon) + do (unless (valid-specifier-tag-p tag) + (define-specifier-tag tag #'ignore))) ;; Add special tag for use by initialization code. Code that ;; sets up default specs should use this tag. Code that needs to @@ -623,6 +618,11 @@ (define-specifier-tag 'default) +;; The x-resource specifier tag is provide so the X resource initialization +;; code can be overridden by custom without trouble. + +(define-specifier-tag 'x-resource) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; "Heuristic" specifier functions ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -988,4 +988,18 @@ (specifier-instance specifier domain)))) (list (cons nil inst)))))))))) +;; Character 160 (octal 0240) displays incorrectly under some X +;; installations apparently due to a universally crocked font width +;; specification. Display it as a space since that's what's expected. +;; +;; (make-char-table 'generic) instead of (make-display-table) because +;; make-display-table isn't dumped, and this file is. +;; +;; We also want the global display table to be actually globally +;; initialised; that's why this is here, and not in x-init.el, these days. + +(set-specifier current-display-table + #s(char-table type generic data (?\xA0 ?\x20)) + 'global) + ;;; specifier.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/startup.el --- a/lisp/startup.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/startup.el Sat Oct 25 21:40:46 2008 +0900 @@ -234,6 +234,8 @@ ("-eval" . command-line-do-eval) ("-load" . command-line-do-load) ("-l" . command-line-do-load) + ("--script" . command-line-do-script) + ("-script" . command-line-do-script) ("-insert" . command-line-do-insert) ("-i" . command-line-do-insert) ("-kill" . command-line-do-kill) @@ -437,6 +439,12 @@ (setq file (expand-file-name file))) (load file nil t))) +(defun command-line-do-script (arg) + "Load the named file of Lisp code into XEmacs. +" + (let ((file (pop command-line-args-left))) + (load file nil t t))) + (defun command-line-do-insert (arg) "Insert file into the current buffer. " @@ -718,13 +726,9 @@ (require 'id-x-toolbar) (init-toolbar))) - ;; Run the window system's init function. tty is considered to be - ;; a type of window system for this purpose. This creates the - ;; initial (non stdio) device. - (when (and initial-window-system (not noninteractive)) - (funcall (intern (concat "init-" - (symbol-name initial-window-system) - "-win")))) + ;; Create the initial device (which may be the already-created stdio + ;; device, if we're noninteractive). + (make-device initial-device-type nil nil) ;; When not in batch mode, this creates the first visible frame, ;; and deletes the stdio device. @@ -849,12 +853,16 @@ (or (find-user-init-directory-init-file init-directory) (find-user-home-directory-init-file home-directory)))) +(defun ask-about-user-init-file-migration-p () + "Check whether we want to ask the user if she wants to migrate the init file." + (and (not load-home-init-file) + (not (find-user-init-directory-init-file user-init-directory)) + (stringp user-init-file) + (file-readable-p user-init-file))) + (defun maybe-migrate-user-init-file () "Ask user if she wants to migrate the init file(s) to new location." - (if (and (not load-home-init-file) - (not (find-user-init-directory-init-file user-init-directory)) - (stringp user-init-file) - (file-readable-p user-init-file)) + (if (ask-about-user-init-file-migration-p) (if (with-output-to-temp-buffer (help-buffer-name nil) (progn (princ "XEmacs recommends that the initialization code in @@ -880,24 +888,27 @@ (yes-or-no-p-minibuf (concat "Migrate init file to " user-init-directory "? ")))) + (progn (migrate-user-init-file) - (maybe-create-compatibility-dot-emacs)) - (customize-save-variable 'load-home-init-file t)))) + (with-output-to-temp-buffer (help-buffer-name nil) + (progn + (princ "The initialization code has now been migrated to the ") + (princ user-init-directory) + (princ "directory. + +For backwards compatibility with, for example, older versions of XEmacs, +XEmacs can create a special old-style .emacs file in your home +directory which will load the relocated initialization code. + +NOTE THAT THIS WILL OVERWRITE YOUR EXISTING .emacs FILE!") + (show-temp-buffer-in-current-frame standard-output) + (maybe-create-compatibility-dot-emacs)))) + (set-load-home-init-file user-init-file t)))) (defun maybe-create-compatibility-dot-emacs () "Ask user if she wants to create a .emacs compatibility file." - (if (with-output-to-temp-buffer (help-buffer-name nil) - (progn - (princ "The initialization code has now been migrated to the ") - (princ user-init-directory) - (princ "directory. - -For backwards compatibility with, for example, older versions of XEmacs, -XEmacs can create a special old-style .emacs file in your home -directory which will load the relocated initialization code.") - (show-temp-buffer-in-current-frame standard-output) - (yes-or-no-p-minibuf "Create compatibility .emacs? "))) + (if (yes-or-no-p-minibuf "Create compatibility .emacs?") (create-compatibility-dot-emacs))) (defun migrate-user-init-file () @@ -908,16 +919,44 @@ (message "Creating %s directory..." user-init-directory) (make-directory user-init-directory))) (message "Migrating custom file...") - (customize-set-value 'load-home-init-file nil) - (custom-migrate-custom-file (make-custom-file-name user-init-file - 'force-new)) - (message "Moving init file...") + (set-load-home-init-file user-init-file nil) + (setq custom-file (make-custom-file-name user-init-file 'force-new)) + (custom-save-all) + (message "Copying init file...") (let ((new-user-init-file (expand-file-name user-init-file-base user-init-directory))) - (rename-file user-init-file new-user-init-file) + (copy-file user-init-file new-user-init-file) (setq user-init-file new-user-init-file)) (message "Migration done.")) +(defun set-load-home-init-file (filename val) + "Put code in `filename' to set `load-home-init-file' to `val'. +More precisely, remove the first `setq' form for `load-home-init-file', +and replace it by (setq load-home-init-file t) if `val' is non-nil." + (save-excursion + (set-buffer (find-file-noselect filename)) + (goto-char (point-min)) + (condition-case nil + (block find-existing + (while (not (eobp)) + (forward-sexp 1) + (backward-sexp 1) + (let* ((beginning (point)) + (sexp (read (current-buffer)))) + (if (and (consp sexp) + (consp (cdr sexp)) + (eq 'setq (car sexp)) + (eq 'load-home-init-file (cadr sexp))) + (progn + (forward-line 1) + (delete-region beginning (point)) + (return-from find-existing nil)) + (forward-sexp 1))))) + (error nil)) ; ignore if there are no sexprs in the file + (if val + (insert "(setq load-home-init-file t) ; don't load init file from ~/.xemacs/init.el\n")) + (save-buffer))) + (defun create-compatibility-dot-emacs () "Create .emacs compatibility file for migrated setup." (message "Creating .emacs compatibility file.") @@ -952,8 +991,9 @@ (rename-file user-init-file target-file-name 'ok-if-already-exists) (setq user-init-file target-file-name) (let ((old-custom-file custom-file)) - (custom-migrate-custom-file target-file-name) - (customize-save-variable 'load-home-init-file t) + (setq custom-file target-file-name) + (custom-save-all) + (set-load-home-init-file user-init-file t) (delete-file old-custom-file)))) (defun load-user-init-file () @@ -1076,7 +1116,8 @@ ;; Don't clobber a non-scratch buffer if init file ;; has selected it. - (when (string= (buffer-name) "*scratch*") + (when (and (string= (buffer-name) "*scratch*") + (not (ask-about-user-init-file-migration-p))) (unless (or inhibit-startup-message (input-pending-p)) (let (tmout) @@ -1412,7 +1453,7 @@ If SET-GLOBAL-PACKAGE-PATHS is non-nil, initialize the global package path variables referring to the particular types of packages -(`early-package-hierarchies', `early-package-load-path', +\(`early-package-hierarchies', `early-package-load-path', `late-package-hierarchies', `late-package-load-path', `last-package-hierarchies', `last-package-load-path')." (let (earlyp latep lastp earlyp-lp latep-lp lastp-lp) @@ -1452,7 +1493,7 @@ t))) (setq emacs-roots (paths-find-emacs-roots invocation-directory invocation-name - #'paths-emacs-data-root-p)) + #'paths-emacs-root-p)) (setq emacs-data-roots (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-data-root-p)) @@ -1496,7 +1537,8 @@ (setq lisp-directory (paths-find-lisp-directory emacs-roots)) (if debug-paths - (princ (format "lisp-directory:\n%S\n" lisp-directory) + (princ (format "configure-lisp-directory and lisp-directory:\n%S\n%S\n" + configure-lisp-directory lisp-directory) 'external-debugging-output)) (if (featurep 'mule) @@ -1505,8 +1547,8 @@ (paths-find-mule-lisp-directory emacs-roots lisp-directory)) (if debug-paths - (princ (format "mule-lisp-directory:\n%S\n" - mule-lisp-directory) + (princ (format "configure-mule-lisp-directory and mule-lisp-directory:\n%S\n%S\n" + configure-mule-lisp-directory mule-lisp-directory) 'external-debugging-output))) (setq mule-lisp-directory '())) @@ -1514,20 +1556,21 @@ (paths-find-site-lisp-directory emacs-roots))) (if (and debug-paths (null inhibit-site-lisp)) - (princ (format "site-directory:\n%S\n" site-directory) + (princ (format "configure-site-directory and site-directory:\n%S\n%S\n" + configure-site-directory site-directory) 'external-debugging-output)) (setq load-path (startup-find-load-path inhibit-packages t)) (when debug-paths - (princ (format "early-package-hierarchies and early-package-load-path:\n%S\n%S\n" - early-package-hierarchies early-package-load-path) + (princ (format "configure-early-package-directories, early-package-hierarchies and early-package-load-path:\n%S\n%S\n%S\n" + configure-early-package-directories early-package-hierarchies early-package-load-path) 'external-debugging-output) - (princ (format "late-package-hierarchies and late-package-load-path:\n%S\n%S\n" - late-package-hierarchies late-package-load-path) + (princ (format "configure-late-package-directories, late-package-hierarchies and late-package-load-path:\n%S\n%S\n" + configure-late-package-directories late-package-hierarchies late-package-load-path) 'external-debugging-output) - (princ (format "last-package-hierarchies and last-package-load-path:\n%S\n%S\n" - last-package-hierarchies last-package-load-path) + (princ (format "configure-last-package-directories, last-package-hierarchies and last-package-load-path:\n%S\n%S\n" + configure-last-package-directories last-package-hierarchies last-package-load-path) 'external-debugging-output)) (if debug-paths @@ -1535,14 +1578,15 @@ 'external-debugging-output)) (setq module-directory (paths-find-module-directory emacs-roots)) (if debug-paths - (princ (format "module-directory:\n%S\n" module-directory) + (princ (format "configure-module-directory and module-directory:\n%S\n" + configure-module-directory module-directory) 'external-debugging-output)) (setq site-module-directory (and (null inhibit-site-modules) (paths-find-site-module-directory emacs-roots))) (if (and debug-paths (null inhibit-site-modules)) - (princ (format "site-module-directory:\n%S\n" - site-module-directory) + (princ (format "configure-site-module-directory and site-module-directory:\n%S\n%S\n" + configure-site-module-directory site-module-directory) 'external-debugging-output)) (setq module-load-path (paths-construct-module-load-path @@ -1557,13 +1601,15 @@ early-package-hierarchies late-package-hierarchies last-package-hierarchies)) (if debug-paths - (princ (format "Info-directory-list:\n%S\n" Info-directory-list) + (princ (format "configure-info-directory, configure-info-path and Info-directory-list:\n%S\n%S\n%S\n" + configure-info-directory configure-info-path Info-directory-list) 'external-debugging-output)) (setq exec-directory (paths-find-exec-directory emacs-roots)) (if debug-paths - (princ (format "exec-directory:\n%s\n" exec-directory) + (princ (format "configure-exec-directory and exec-directory:\n%S\n%S\n" + configure-exec-directory exec-directory) 'external-debugging-output)) (setq exec-path @@ -1578,13 +1624,15 @@ (setq doc-directory (paths-find-doc-directory emacs-roots)) (if debug-paths - (princ (format "doc-directory:\n%S\n" doc-directory) + (princ (format "configure-doc-directory and doc-directory:\n%S\n%S\n" + configure-doc-directory doc-directory) 'external-debugging-output)) (setq data-directory (paths-find-data-directory emacs-roots)) (if debug-paths - (princ (format "data-directory:\n%S\n" data-directory) + (princ (format "configure-data-directory and data-directory:\n%S\n%S\n" + configure-data-directory data-directory) 'external-debugging-output)) (setq data-directory-list (paths-construct-data-directory-list diff -r 71bf2c5667ba -r 66411359ce4e lisp/subr.el --- a/lisp/subr.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/subr.el Sat Oct 25 21:40:46 2008 +0900 @@ -390,19 +390,19 @@ argument to `add-one-shot-hook'." (add-one-shot-hook hook function append t)) -(defun add-to-list (list-var element &optional append) +(defun add-to-list (list-var element &optional append compare-fn) "Add to the value of LIST-VAR the element ELEMENT if it isn't there yet. -The test for presence of ELEMENT is done with `equal'. -If ELEMENT is added, it is added at the beginning of the list, -unless the optional argument APPEND is non-nil, in which case -ELEMENT is added at the end. +The test for presence of ELEMENT is done with COMPARE-FN; if +COMPARE-FN is nil, then it defaults to `equal'. If ELEMENT is added, +it is added at the beginning of the list, unless the optional argument +APPEND is non-nil, in which case ELEMENT is added at the end. If you want to use `add-to-list' on a variable that is not defined until a certain package is loaded, you should put the call to `add-to-list' into a hook function that will be run only after loading the package. `eval-after-load' provides one way to do this. In some cases other hooks, such as major mode hooks, can do the job." - (if (member element (symbol-value list-var)) + (if (member* element (symbol-value list-var) :test (or compare-fn #'equal)) (symbol-value list-var) (set list-var (if append @@ -579,6 +579,19 @@ ; . ,body) ; (combine-after-change-execute))) +(defmacro with-case-table (table &rest body) + "Execute the forms in BODY with TABLE as the current case table. +The value returned is the value of the last form in BODY." + (declare (indent 1) (debug t)) + (let ((old-case-table (make-symbol "table")) + (old-buffer (make-symbol "buffer"))) + `(let ((,old-case-table (current-case-table)) + (,old-buffer (current-buffer))) + (unwind-protect + (progn (set-case-table ,table) + ,@body) + (with-current-buffer ,old-buffer + (set-case-table ,old-case-table)))))) (defvar delay-mode-hooks nil "If non-nil, `run-mode-hooks' should delay running the hooks.") @@ -791,20 +804,33 @@ Return a new string containing the replacements. -Optional arguments FIXEDCASE, LITERAL and SUBEXP are like the -arguments with the same names of function `replace-match'. If START -is non-nil, start replacements at that index in STRING. +Optional arguments FIXEDCASE and LITERAL are like the arguments with +the same names of function `replace-match'. If START is non-nil, +start replacements at that index in STRING. + +For compatibility with old XEmacs code and with recent GNU Emacs, the +interpretation of SUBEXP is somewhat complicated. If SUBEXP is a +buffer, it is interpreted as the buffer which provides syntax tables +and case tables for the match and replacement. If it is not a buffer, +the current buffer is used. If SUBEXP is an integer, it is the index +of the subexpression of REGEXP which is to be replaced. REP is either a string used as the NEWTEXT arg of `replace-match' or a function. If it is a function it is applied to each match to generate the replacement passed to `replace-match'; the match-data at this -point are such that match 0 is the function's argument. +point are such that `(match-string SUBEXP STRING)' is the function's +argument if SUBEXP is an integer \(otherwise the whole match is passed +and replaced). To replace only the first match (if any), make REGEXP match up to \\' and replace a sub-expression, e.g. (replace-regexp-in-string \"\\(foo\\).*\\'\" \"bar\" \" foo foo\" nil nil 1) => \" bar foo\" -" + +Signals `invalid-argument' if SUBEXP is not an integer, buffer, or nil; +or is an integer, but the indicated subexpression was not matched. +Signals `invalid-argument' if STRING is nil but the last text matched was a string, +or if STRING is a string but the last text matched was a buffer." ;; To avoid excessive consing from multiple matches in long strings, ;; don't just call `replace-match' continually. Walk down the @@ -817,6 +843,7 @@ ;; might be reasonable to do so for long enough STRING.] (let ((l (length string)) (start (or start 0)) + (expndx (if (integerp subexp) subexp 0)) matches str mb me) (save-match-data (while (and (< start l) (string-match regexp string start)) @@ -833,7 +860,8 @@ (setq matches (cons (replace-match (if (stringp rep) rep - (funcall rep (match-string 0 str))) + (funcall rep (match-string expndx str))) + ;; no, this subexp shouldn't be expndx fixedcase literal str subexp) (cons (substring string start mb) ; unmatched prefix matches))) @@ -898,6 +926,26 @@ (define-function 'char-int 'char-to-int) (define-function 'int-char 'int-to-char) +;; XEmacs addition. +(defun integer-to-bit-vector (integer &optional minlength) + "Return INTEGER converted to a bit vector. +Optional argument MINLENGTH gives a minimum length for the returned vector. +If MINLENGTH is not given, zero high-order bits will be ignored." + (check-argument-type #'integerp integer) + (setq minlength (or minlength 0)) + (check-nonnegative-number minlength) + (read (format (format "#*%%0%db" minlength) integer))) + +;; XEmacs addition. +(defun bit-vector-to-integer (bit-vector) + "Return BIT-VECTOR converted to an integer. +If bignum support is available, BIT-VECTOR's length is unlimited. +Otherwise the limit is the number of value bits in an Lisp integer. " + (check-argument-type #'bit-vector-p bit-vector) + (setq bit-vector (prin1-to-string bit-vector)) + (aset bit-vector 1 ?b) + (read bit-vector)) + (defun string-width (string) "Return number of columns STRING occupies when displayed. With international (Mule) support, uses the charset-columns attribute of @@ -932,17 +980,17 @@ TYPE should be `list' or `vector'." (ecase type (list - (mapcar #'identity string)) + (append string nil)) (vector - (mapvector #'identity string)))) + (vconcat string)))) (defun string-to-list (string) "Return a list of characters in STRING." - (mapcar #'identity string)) + (append string nil)) (defun string-to-vector (string) "Return a vector of characters in STRING." - (mapvector #'identity string)) + (vconcat string)) (defun store-substring (string idx obj) "Embed OBJ (string or character) at index IDX of STRING." @@ -1326,7 +1374,7 @@ (let ((newsym (gensym))) `(let ((,newsym ,argument)) (if (not (argument-in-range-p ,newsym ,min ,max)) - (signal-error 'args-out-of-range ,newsym ,min ,max)))))) + (signal-error 'args-out-of-range (list ,newsym ,min ,max))))))) (defun signal-error (error-symbol data) "Signal a non-continuable error. Args are ERROR-SYMBOL, and associated DATA. @@ -1663,7 +1711,7 @@ ;; assq-del-all in obsolete.el. -;; (defun make-temp-file (prefix &optional dir-flag suffix) #### doesn't exist. +;; make-temp-file in files.el. ;; add-minor-mode in modeline.el. @@ -1674,4 +1722,23 @@ ;; define-mail-user-agent is in simple.el. +;; XEmacs; added. +(defun skip-chars-quote (string) + "Return a string that means all characters in STRING will be skipped, +if passed to `skip-chars-forward' or `skip-chars-backward'. + +Ranges and carets are not treated specially. This implementation is +in Lisp; do not use it in performance-critical code." + (let ((list (delete-duplicates (string-to-list string) :test #'=))) + (when (/= 1 (length list)) ;; No quoting needed in a string of length 1. + (when (eq ?^ (car list)) + (setq list (nconc (cdr list) '(?^)))) + (when (memq ?\\ list) + (setq list (delq ?\\ list) + list (nconc (list ?\\ ?\\) list))) + (when (memq ?- list) + (setq list (delq ?- list) + list (nconc list '(?\\ ?-))))) + (apply #'string list))) + ;;; subr.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/syntax.el --- a/lisp/syntax.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/syntax.el Sat Oct 25 21:40:46 2008 +0900 @@ -39,6 +39,14 @@ It inherits all characters from the standard syntax table." (make-char-table 'syntax)) +(defun syntax-after (pos) + "Return the raw syntax of the char after POS. +If POS is outside the buffer's accessible portion, return nil." + (unless (or (< pos (point-min)) (>= pos (point-max))) + (let ((st (if lookup-syntax-properties + (get-char-property pos 'syntax-table)))) + (char-syntax (char-after pos) (or st (syntax-table)))))) + (defun simple-set-syntax-entry (char spec table) (put-char-table char spec table)) diff -r 71bf2c5667ba -r 66411359ce4e lisp/tty-init.el --- a/lisp/tty-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/tty-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -31,13 +31,13 @@ ;;; Code: -(defvar pre-tty-win-initted nil) +(defvar make-device-early-tty-entry-point-called-p nil + "Whether `make-device-early-tty-entry-point' has been called, at least once.") -;; called both from init-tty-win and from the C code. -(defun init-pre-tty-win () - "Initialize TTY at startup (pre). Don't call this." +(defun make-device-early-tty-entry-point () + "Entry point to set up the Lisp environment for TTY device creation." (with-fboundp 'register-tty-color - (unless pre-tty-win-initted + (unless make-device-early-tty-entry-point-called-p (register-tty-color "black" "\e[30m" "\e[40m") (register-tty-color "red" "\e[31m" "\e[41m") (register-tty-color "green" "\e[32m" "\e[42m") @@ -59,16 +59,17 @@ (setq pre-tty-win-initted t)))) -;; called both from init-tty-win and from the C code. -;; we have to do this for every created TTY console. -(defun init-post-tty-win (console) - "Initialize TTY at console creation time (post). Don't call this." +;; We have to do this for every created TTY console, after the first frame +;; has been created. +(defun make-frame-after-init-entry-point (console) + "Entry point for Lisp called after first frame creation on a TTY device." ;; load the appropriate term-type-specific Lisp file. ;; we don't do this at startup here so that the user can ;; override term-file-prefix. (startup.el does it after ;; loading the init file.) - (if (featurep 'mule) - (declare-fboundp (init-mule-tty-win))) + (when (and (find-coding-system 'euc-jp) + (string-match "^kterm" (getenv "TERM"))) + (set-console-tty-coding-system console 'euc-jp)) (when init-file-loaded ;; temporarily select the console so that the changes ;; to function-key-map are made for the right console. @@ -79,16 +80,6 @@ (load-terminal-library)) (select-console foobar))))) -(defvar tty-win-initted nil) - -(defun init-tty-win () - "Initialize TTY at startup. Don't call this." - (unless tty-win-initted - (init-pre-tty-win) - (make-tty-device nil nil) - (init-post-tty-win (selected-console)) - (setq tty-win-initted t))) - (defun make-frame-on-tty (tty &optional props) "Create a frame on the TTY connection named TTY. TTY should be a TTY device name such as \"/dev/ttyp3\" (as returned by diff -r 71bf2c5667ba -r 66411359ce4e lisp/unicode.el --- a/lisp/unicode.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/unicode.el Sat Oct 25 21:40:46 2008 +0900 @@ -42,6 +42,8 @@ ;; and saved in ISO 2022 coding systems using the UTF-8 escape described in ;; ISO-IR 196. +(eval-when-compile (when (featurep 'mule) (require 'ccl))) + ;; accessed in loadup.el, mule-cmds.el; see discussion in unicode.c (defvar load-unicode-tables-at-dump-time (eq system-type 'windows-nt) "[INTERNAL] Whether to load the Unicode tables at dump time. @@ -71,7 +73,6 @@ ("8859-3.TXT" latin-iso8859-3 #xA0 #xFF #x-80) ("8859-4.TXT" latin-iso8859-4 #xA0 #xFF #x-80) ("8859-5.TXT" cyrillic-iso8859-5 #xA0 #xFF #x-80) - ("8859-6.TXT" arabic-iso8859-6 #xA0 #xFF #x-80) ("8859-7.TXT" greek-iso8859-7 #xA0 #xFF #x-80) ("8859-8.TXT" hebrew-iso8859-8 #xA0 #xFF #x-80) ("8859-9.TXT" latin-iso8859-9 #xA0 #xFF #x-80) @@ -142,7 +143,26 @@ (expand-file-name (car args) undir) (cdr args))) (cdr tables)))) - parse-args))) + parse-args) + ;; The default-unicode-precedence-list. We set this here to default to + ;; *not* mapping various European characters to East Asian characters; + ;; otherwise the default-unicode-precedence-list is numerically ordered + ;; by charset ID. + (declare-fboundp + (set-default-unicode-precedence-list + '(ascii control-1 latin-iso8859-1 latin-iso8859-2 latin-iso8859-15 + greek-iso8859-7 hebrew-iso8859-8 ipa cyrillic-iso8859-5 + latin-iso8859-16 latin-iso8859-3 latin-iso8859-4 latin-iso8859-9 + vietnamese-viscii-lower vietnamese-viscii-upper + jit-ucs-charset-0 japanese-jisx0208 japanese-jisx0208-1978 + japanese-jisx0212 japanese-jisx0213-1 japanese-jisx0213-2 + chinese-gb2312 chinese-sisheng chinese-big5-1 chinese-big5-2 + indian-is13194 korean-ksc5601 chinese-cns11643-1 chinese-cns11643-2 + chinese-isoir165 + composite ethiopic indian-1-column indian-2-column jit-ucs-charset-0 + katakana-jisx0201 lao thai-tis620 thai-xtis tibetan tibetan-1-column + latin-jisx0201 chinese-cns11643-3 chinese-cns11643-4 + chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7))))) (make-coding-system 'utf-16 'unicode @@ -231,6 +251,26 @@ little-endian t)) (make-coding-system + 'utf-32 'unicode + "UTF-32" + '(mnemonic "UTF32" + documentation + "UTF-32 Unicode encoding -- fixed-width four-byte encoding, +characters less than #x10FFFF are not supported. " + unicode-type utf-32)) + +(make-coding-system + 'utf-32-little-endian 'unicode + "UTF-32 Little Endian" + '(mnemonic "UTF32-LE" + documentation + "Little-endian version of UTF-32 Unicode encoding. + +A fixed-width four-byte encoding, characters less than #x10FFFF are not +supported. " + unicode-type ucs-4 little-endian t)) + +(make-coding-system 'utf-8 'unicode "UTF-8" '(mnemonic "UTF8" @@ -272,6 +312,10 @@ (defun decode-char (quote-ucs code &optional restriction) "FSF compatibility--return Mule character with Unicode codepoint CODE. The second argument must be 'ucs, the third argument is ignored. " + ;; We're prepared to accept invalid Unicode in unicode-to-char, but not in + ;; this function, which is the API that should actually be used, since + ;; it's available in GNU and in Mule-UCS. + (check-argument-range code #x0 #x10FFFF) (assert (eq quote-ucs 'ucs) t "Sorry, decode-char doesn't yet support anything but the UCS. ") (unicode-to-char code)) @@ -283,31 +327,302 @@ "Sorry, encode-char doesn't yet support anything but the UCS. ") (char-to-unicode char)) +(defconst ccl-encode-to-ucs-2 + (eval-when-compile + (let ((pre-existing + ;; This is the compiled CCL program from the assert + ;; below. Since this file is dumped and ccl.el isn't (and + ;; even when it was, it was dumped much later than this + ;; one), we can't compile the program at dump time. We can + ;; check at byte compile time that the program is as + ;; expected, though. + [1 16 131127 7 98872 65823 1307 5 -65536 65313 64833 1028 + 147513 8 82009 255 22])) + (when (featurep 'mule) + ;; Check that the pre-existing constant reflects the intended + ;; CCL program. + (assert + (equal pre-existing + (ccl-compile + `(1 + ( ;; mule-to-unicode's first argument is the + ;; charset ID, the second its first byte + ;; left shifted by 7 bits masked with its + ;; second byte. + (r1 = (r1 << 7)) + (r1 = (r1 | r2)) + (mule-to-unicode r0 r1) + (if (r0 & ,(lognot #xFFFF)) + ;; Redisplay looks in r1 and r2 for the first + ;; and second bytes of the X11 font, + ;; respectively. For non-BMP characters we + ;; display U+FFFD. + ((r1 = #xFF) + (r2 = #xFD)) + ((r1 = (r0 >> 8)) + (r2 = (r0 & #xFF)))))))) + nil + "The pre-compiled CCL program appears broken. ")) + pre-existing)) + "CCL program to transform Mule characters to UCS-2.") + (when (featurep 'mule) - ;; This CCL program is used for displaying the fallback UCS character set, - ;; and can be repurposed to lao and the IPA, all going well. - ;; - ;; define-ccl-program is available after mule-ccl is loaded, much later - ;; than this file in the build process. The below is the result of + (put 'ccl-encode-to-ucs-2 'ccl-program-idx + (declare-fboundp + (register-ccl-program 'ccl-encode-to-ucs-2 ccl-encode-to-ucs-2)))) + +;; Now, create jit-ucs-charset-0 entries for those characters in Windows +;; Glyph List 4 that would otherwise end up in East Asian character sets. +;; +;; WGL4 is a character repertoire from Microsoft that gives a guideline +;; for font implementors as to what characters are sufficient for +;; pan-European support. The intention of this code is to avoid the +;; situation where these characters end up mapping to East Asian XEmacs +;; characters, which generally clash strongly with European characters +;; both in font choice and character width; jit-ucs-charset-0 is a +;; single-width character set which comes before the East Asian character +;; sets in the default-unicode-precedence-list above. +(loop for (ucs ascii-or-latin-1) + in '((#x2013 ?-) ;; U+2013 EN DASH + (#x2014 ?-) ;; U+2014 EM DASH + (#x2105 ?%) ;; U+2105 CARE OF + (#x203e ?-) ;; U+203E OVERLINE + (#x221f ?|) ;; U+221F RIGHT ANGLE + (#x2584 ?|) ;; U+2584 LOWER HALF BLOCK + (#x2588 ?|) ;; U+2588 FULL BLOCK + (#x258c ?|) ;; U+258C LEFT HALF BLOCK + (#x2550 ?|) ;; U+2550 BOX DRAWINGS DOUBLE HORIZONTAL + (#x255e ?|) ;; U+255E BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + (#x256a ?|) ;; U+256A BOX DRAWINGS VERTICAL SINGLE & HORIZONTAL DOUBLE + (#x2561 ?|) ;; U+2561 BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + (#x2215 ?/) ;; U+2215 DIVISION SLASH + (#x02c9 ?`) ;; U+02C9 MODIFIER LETTER MACRON + (#x2211 ?s) ;; U+2211 N-ARY SUMMATION + (#x220f ?s) ;; U+220F N-ARY PRODUCT + (#x2248 ?=) ;; U+2248 ALMOST EQUAL TO + (#x2264 ?=) ;; U+2264 LESS-THAN OR EQUAL TO + (#x2265 ?=) ;; U+2265 GREATER-THAN OR EQUAL TO + (#x201c ?') ;; U+201C LEFT DOUBLE QUOTATION MARK + (#x2026 ?.) ;; U+2026 HORIZONTAL ELLIPSIS + (#x2212 ?-) ;; U+2212 MINUS SIGN + (#x2260 ?=) ;; U+2260 NOT EQUAL TO + (#x221e ?=) ;; U+221E INFINITY + (#x2642 ?=) ;; U+2642 MALE SIGN + (#x2640 ?=) ;; U+2640 FEMALE SIGN + (#x2032 ?=) ;; U+2032 PRIME + (#x2033 ?=) ;; U+2033 DOUBLE PRIME + (#x25cb ?=) ;; U+25CB WHITE CIRCLE + (#x25cf ?=) ;; U+25CF BLACK CIRCLE + (#x25a1 ?=) ;; U+25A1 WHITE SQUARE + (#x25a0 ?=) ;; U+25A0 BLACK SQUARE + (#x25b2 ?=) ;; U+25B2 BLACK UP-POINTING TRIANGLE + (#x25bc ?=) ;; U+25BC BLACK DOWN-POINTING TRIANGLE + (#x2192 ?=) ;; U+2192 RIGHTWARDS ARROW + (#x2190 ?=) ;; U+2190 LEFTWARDS ARROW + (#x2191 ?=) ;; U+2191 UPWARDS ARROW + (#x2193 ?=) ;; U+2193 DOWNWARDS ARROW + (#x2229 ?=) ;; U+2229 INTERSECTION + (#x2202 ?=) ;; U+2202 PARTIAL DIFFERENTIAL + (#x2261 ?=) ;; U+2261 IDENTICAL TO + (#x221a ?=) ;; U+221A SQUARE ROOT + (#x222b ?=) ;; U+222B INTEGRAL + (#x2030 ?=) ;; U+2030 PER MILLE SIGN + (#x266a ?=) ;; U+266A EIGHTH NOTE + (#x2020 ?*) ;; U+2020 DAGGER + (#x2021 ?*) ;; U+2021 DOUBLE DAGGER + (#x2500 ?|) ;; U+2500 BOX DRAWINGS LIGHT HORIZONTAL + (#x2502 ?|) ;; U+2502 BOX DRAWINGS LIGHT VERTICAL + (#x250c ?|) ;; U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT + (#x2510 ?|) ;; U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT + (#x2518 ?|) ;; U+2518 BOX DRAWINGS LIGHT UP AND LEFT + (#x2514 ?|) ;; U+2514 BOX DRAWINGS LIGHT UP AND RIGHT + (#x251c ?|) ;; U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT + (#x252c ?|) ;; U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + (#x2524 ?|) ;; U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT + (#x2534 ?|) ;; U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL + (#x253c ?|) ;; U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + (#x02da ?^) ;; U+02DA RING ABOVE + (#x2122 ?\xa9) ;; U+2122 TRADE MARK SIGN, ?,A)(B + + (#x0132 ?\xe6) ;; U+0132 LATIN CAPITAL LIGATURE IJ, ?,Af(B + (#x013f ?\xe6) ;; U+013F LATIN CAPITAL LETTER L WITH MIDDLE DOT, ?,Af(B + + (#x0133 ?\xe6) ;; U+0133 LATIN SMALL LIGATURE IJ, ?,Af(B + (#x0140 ?\xe6) ;; U+0140 LATIN SMALL LETTER L WITH MIDDLE DOT, ?,Af(B + (#x0149 ?\xe6) ;; U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPH,?,Af(B + + (#x2194 ?|) ;; U+2194 LEFT RIGHT ARROW + (#x2660 ?*) ;; U+2660 BLACK SPADE SUIT + (#x2665 ?*) ;; U+2665 BLACK HEART SUIT + (#x2663 ?*) ;; U+2663 BLACK CLUB SUIT + (#x2592 ?|) ;; U+2592 MEDIUM SHADE + (#x2195 ?|) ;; U+2195 UP DOWN ARROW + + (#x2113 ?\xb9) ;; U+2113 SCRIPT SMALL L, ?,A9(B + (#x215b ?\xbe) ;; U+215B VULGAR FRACTION ONE EIGHTH, ?,A>(B + (#x215c ?\xbe) ;; U+215C VULGAR FRACTION THREE EIGHTHS, ?,A>(B + (#x215d ?\xbe) ;; U+215D VULGAR FRACTION FIVE EIGHTHS, ?,A>(B + (#x215e ?\xbe) ;; U+215E VULGAR FRACTION SEVEN EIGHTHS, ?,A>(B + (#x207f ?\xbe) ;; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A>(B + + ;; These are not in WGL 4, but are IPA characters that should not + ;; be double width. They are the only IPA characters that both + ;; occur in packages/mule-packages/leim/ipa.el and end up in East + ;; Asian character sets when that file is loaded in an XEmacs + ;; without packages. + (#x2197 ?|) ;; U+2197 NORTH EAST ARROW + (#x2199 ?|) ;; U+2199 SOUTH WEST ARROW + (#x2191 ?|) ;; U+2191 UPWARDS ARROW + (#x207f ?\xb9)) ;; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A9(B + with decoded = nil + with syntax-table = (standard-syntax-table) + initially (unless (featurep 'mule) (return)) + ;; This creates jit-ucs-charset-0 entries because: ;; - ;; (macroexpand - ;; '(define-ccl-program ccl-encode-to-ucs-2 - ;; `(1 - ;; ((r1 = (r1 << 8)) - ;; (r1 = (r1 | r2)) - ;; (mule-to-unicode r0 r1) - ;; (r1 = (r0 >> 8)) - ;; (r2 = (r0 & 255)))) - ;; "CCL program to transform Mule characters to UCS-2.")) + ;; 1. If the tables are dumped, it is run at dump time before they are + ;; dumped, and as such before the relevant conversions are available + ;; (they are made available in mule/general-late.el). + ;; + ;; 2. If the tables are not dumped, it is run at dump time, long before + ;; any of the other mappings are available. ;; - ;; and it should occasionally be confirmed that the correspondence still - ;; holds. + do + (setq decoded (decode-char 'ucs ucs)) + (assert (eq (declare-fboundp (char-charset decoded)) + 'jit-ucs-charset-0) nil + "Unexpected Unicode decoding behavior. ") + (modify-syntax-entry decoded + (string + (char-syntax ascii-or-latin-1)) + syntax-table)) + +;; *Sigh*, declarations needs to be at the start of the line to be picked up +;; by make-docfile. Not so much an issue with ccl-encode-to-ucs-2, which we +;; don't necessarily want to advertise, but the following are important. + +;; Create all the Unicode error sequences, normally as jit-ucs-charset-0 +;; characters starting at U+200000 (which isn't a valid Unicode code +;; point). Make them available to user code. +(defvar unicode-error-default-translation-table + (loop + with char-table = (make-char-table 'generic) + for i from ?\x00 to ?\xFF + initially (unless (featurep 'mule) (return)) + do + (put-char-table (aref + ;; #xd800 is the first leading surrogate; + ;; trailing surrogates must be in the range + ;; #xdc00-#xdfff. These examples are not, so we + ;; intentionally provoke an error sequence. + (decode-coding-string (format "\xd8\x00\x00%c" i) + 'utf-16-be) + 3) + i + char-table) + finally return char-table) + "Translation table mapping Unicode error sequences to Latin-1 chars. + +To transform XEmacs Unicode error sequences to the Latin-1 characters that +correspond to the octets on disk, you can use this variable. ") + +(defvar unicode-invalid-sequence-regexp-range + (and (featurep 'mule) + (format "%c%c-%c" + (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 0) + (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 3) + (aref (decode-coding-string "\xd8\x00\x00\xFF" 'utf-16-be) 3))) + "Regular expression range to match Unicode error sequences in XEmacs. + +Invalid Unicode sequences on input are represented as XEmacs +characters with values stored as the keys in +`unicode-error-default-translation-table', one character for each +invalid octet. You can use this variable (with `re-search-forward' or +`skip-chars-forward') to search for such characters; see also +`unicode-error-translate-region'. ") - (let ((prog [1 10 131127 8 98872 65823 147513 8 82009 255 22])) - (defconst ccl-encode-to-ucs-2 prog - "CCL program to transform Mule characters to UCS-2.") - (put (quote ccl-encode-to-ucs-2) (quote ccl-program-idx) - (register-ccl-program (quote ccl-encode-to-ucs-2) prog)) nil)) +;; Check that the lookup table is correct, and that all the actual error +;; sequences are caught by the regexp. +(with-temp-buffer + (loop + for i from ?\x00 to ?\xFF + with to-check = (make-string 20 ?\x20) + initially (unless (featurep 'mule) (return)) + do + (delete-region (point-min) (point-max)) + (insert to-check) + (goto-char 10) + (insert (decode-coding-string (format "\xd8\x00\x00%c" i) + 'utf-16-be)) + (backward-char) + (assert (= i (get-char-table (char-after (point)) + unicode-error-default-translation-table)) + (format "Char ?\\x%x not the expected error sequence!" + i)) + + (goto-char (point-min)) + ;; Comment out until the issue in + ;; 18179.49815.622843.336527@parhasard.net is fixed. + (assert t ; (re-search-forward (concat "[" + ; unicode-invalid-sequence-regexp-range + ; "]")) + nil + (format "Could not find char ?\\x%x in buffer" i)))) + +(defun frob-unicode-errors-region (frob-function begin end &optional buffer) + "Call FROB-FUNCTION on the Unicode error sequences between BEGIN and END. + +Optional argument BUFFER specifies the buffer that should be examined for +such sequences. " + (check-argument-type #'functionp frob-function) + (check-argument-range begin (point-min buffer) (point-max buffer)) + (check-argument-range end (point-min buffer) (point-max buffer)) + (save-excursion + (save-restriction + (if buffer (set-buffer buffer)) + (narrow-to-region begin end) + (goto-char (point-min)) + (while end + (setq begin + (progn + (skip-chars-forward + (concat "^" unicode-invalid-sequence-regexp-range)) + (point)) + end (and (not (= (point) (point-max))) + (progn + (skip-chars-forward + unicode-invalid-sequence-regexp-range) + (point)))) + (if end + (funcall frob-function begin end)))))) + +(defun unicode-error-translate-region (begin end &optional buffer table) + "Translate the Unicode error sequences in BUFFER between BEGIN and END. + +The error sequences are transformed, by default, into the ASCII, +control-1 and latin-iso8859-1 characters with the numeric values +corresponding to the incorrect octets encountered. This is achieved +by using `unicode-error-default-translation-table' (which see) for +TABLE; you can change this by supplying another character table, +mapping from the error sequences to the desired characters. " + (unless table (setq table unicode-error-default-translation-table)) + (frob-unicode-errors-region + (lambda (start finish) + (translate-region start finish table)) + begin end buffer)) + +;; Sure would be nice to be able to use defface here. +(copy-face 'highlight 'unicode-invalid-sequence-warning-face) + +(unless (featurep 'mule) + ;; We do this in such a roundabout way--instead of having the above defun + ;; and defvar calls inside a (when (featurep 'mule) ...) form--to have + ;; make-docfile.c pick up symbol and function documentation correctly. An + ;; alternative approach would be to fix make-docfile.c to be able to read + ;; Lisp. + (mapcar #'unintern + '(ccl-encode-to-ucs-2 unicode-error-default-translation-table + unicode-invalid-regexp-range frob-unicode-errors-region + unicode-error-translate-region))) ;; #### UTF-7 is not yet implemented, and it's tricky to do. There's ;; an implementation in appendix A.1 of the Unicode Standard, Version diff -r 71bf2c5667ba -r 66411359ce4e lisp/update-elc-2.el --- a/lisp/update-elc-2.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/update-elc-2.el Sat Oct 25 21:40:46 2008 +0900 @@ -65,8 +65,7 @@ "^make-docfile\\.el$" "^site-start\\.el$" "^site-load\\.el$" - "^site-init\\.el$" - "^version\\.el$")) + "^site-init\\.el$")) (defvar dirfiles-table (make-hash-table :test 'equal)) @@ -190,8 +189,12 @@ (byte-recompile-file (expand-file-name "custom-load.el" dir) 0) (when (featurep 'mule) (Custom-make-dependencies (expand-file-name "mule" dir)) - (byte-recompile-file (expand-file-name "mule/custom-load.el" dir) 0)) - ) + (byte-recompile-file (expand-file-name "mule/custom-load.el" dir) 0) + ;; See the eval-when-compile in the definition of + ;; Installation-file-coding-system; if the file name sniffing or the + ;; available coding systems have changed, version.elc should be + ;; rebuilt. + (byte-recompile-file (expand-file-name "version.el" dir) 0))) (setq command-line-args-left nil)) ;;; update-elc-2.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/update-elc.el --- a/lisp/update-elc.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/update-elc.el Sat Oct 25 21:40:46 2008 +0900 @@ -117,8 +117,7 @@ '("paths.el" "dumped-lisp.el" "dumped-pkg-lisp.el" - "raw-process.el" - "version.el") + "raw-process.el") "Lisp files that should not be byte compiled. Files in `additional-dump-dependencies' do not need to be listed here.") diff -r 71bf2c5667ba -r 66411359ce4e lisp/version.el --- a/lisp/version.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/version.el Sat Oct 25 21:40:46 2008 +0900 @@ -129,16 +129,48 @@ ;;; We hope that this alias is easier for people to find. (define-function 'version 'emacs-version) -;; Put the emacs version number into the `pure[]' array in a form that -;; `what(1)' can extract from the executable or a core file. We don't -;; actually need this to be pointed to from lisp; pure objects can't -;; be GCed. -(concat "\n@" "(#)" (emacs-version) - "\n@" "(#)" "Configuration: " - system-configuration "\n") +(defvar Installation-file-coding-system + (eval-when-compile `,(coding-system-name (find-coding-system 'native))) + "The coding system used to create the `Installation' file. + +The `Installation' file is created by configure, and the +`Installation-string' variable reflects its contents. + +This is initialized to reflect the native coding system at the time +version.el was byte-compiled; ideally it would reflect the native coding +system of the environment when XEmacs was dumped, but the locale +initialization code isn't called at dump time, and the appropriate value +at byte-compile time should be close enough. Note that this means that the +value of `Installation-string' during dump time thus reflects loading the +file using the `binary' coding system. ") -;;Local variables: -;;version-control: never -;;End: +(defvar Installation-string + ;; Initialize Installation-string. We do it before loading + ;; anything so that dumped code can make use of its value. + (save-current-buffer + (set-buffer (get-buffer-create (generate-new-buffer-name + " *temp*"))) + ;; insert-file-contents-internal bogusly calls + ;; format-decode without checking if it's defined. + (fset 'format-decode #'(lambda (f l &optional v) l)) + (insert-file-contents-internal + (expand-file-name "Installation" build-directory) + ;; Relies on our working out the system coding system + ;; correctly at startup. + nil nil nil nil + ;; Installation-file-coding-system is actually respected in + ;; mule/general-late.el, after all the dumped coding systems have been + ;; loaded. + 'binary) + (fmakunbound 'format-decode) + (prog1 (buffer-substring) + (kill-buffer (current-buffer)))) + "Description of XEmacs installation. -;;; version.el ends here +This reflects the values that the configure script worked out at build time, +including things like the C code features included at compile time and the +installation prefix. Normally used when submitting a bug report; +occasionally used, in a way the XEmacs developers don't endorse, to work out +version information. ") + +;;; version.el ends here \ No newline at end of file diff -r 71bf2c5667ba -r 66411359ce4e lisp/wid-edit.el --- a/lisp/wid-edit.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/wid-edit.el Sat Oct 25 21:40:46 2008 +0900 @@ -1,9 +1,10 @@ ;;; wid-edit.el --- Functions for creating and using widgets. ;; +;; Copyright (C) 2007 Didier Verna ;; Copyright (C) 1996-1997, 1999-2002 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen -;; Maintainer: Hrvoje Niksic +;; Maintainer: Didier Verna ;; Keywords: extensions ;; Version: 1.9960-x ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ @@ -330,7 +331,7 @@ (mouse-set-point event) (let ((pos (event-point event))) (if (and pos (get-char-property pos 'button)) - (widget-button-click event)))) + (widget-button-click event)))) ;;; Widget text specifications. ;; @@ -591,15 +592,15 @@ (defun widget-specify-active (widget) "Make WIDGET active for user modifications." (let ((inactive (widget-get widget :inactive)) - (from (widget-get widget :from)) - (to (widget-get widget :to))) + (from (widget-get widget :from)) + (to (widget-get widget :to))) (when (and inactive (not (extent-detached-p inactive))) ;; Reactivate the buttons and fields covered by the extent. (map-extents 'widget-activation-widget-mapper - nil from to :activate nil 'button-or-field) + nil from to :activate nil 'button-or-field) ;; Reactivate the glyphs. (map-extents 'widget-activation-glyph-mapper - nil from to :activate nil 'end-glyph) + nil from to :activate nil 'end-glyph) (delete-extent inactive) (widget-put widget :inactive nil)))) @@ -706,15 +707,44 @@ ;; ;; These are widget specific. +;; #### Note: this should probably be a more general utility -- dvl +(defsubst widget-prompt-spaceify (prompt) + ;; Add a space at the end of PROMPT if needed + (if (or (string= prompt "") (eq ? (aref prompt (1- (length prompt))))) + prompt + (concat prompt " "))) + +(defsubst widget-prompt (widget &optional prompt default-prompt) + ;; Construct a prompt for WIDGET. + ;; - If PROMPT is given, use it. + ;; - Otherwise, use the :tag property, if any. + ;; - Otherwise, use DEFAULT-PROMPT, if given. + ;; - Otherise, use "Value". + ;; - If the result is not the empty string, add a space for later addition + ;; of the widget type by `widget-prompt-value'. + (unless prompt + (setq prompt (or (and (widget-get widget :tag) + (replace-in-string (widget-get widget :tag) + "^[ \t]+" "" t)) + default-prompt + "Value"))) + (widget-prompt-spaceify prompt)) + + ;;;###autoload -(defun widget-prompt-value (widget prompt &optional value unbound) - "Prompt for a value matching WIDGET, using PROMPT. +(defun widget-prompt-value (widget &optional prompt value unbound) + "Prompt for a value matching WIDGET. +Prompt with PROMPT, or WIDGET's :tag otherwise. The current value is assumed to be VALUE, unless UNBOUND is non-nil." (unless (listp widget) (setq widget (list widget))) - (setq prompt (format "[%s] %s" (widget-type widget) prompt)) (setq widget (widget-convert widget)) - (let ((answer (widget-apply widget :prompt-value prompt value unbound))) + (let ((answer (widget-apply widget + :prompt-value + (format "%s[%s]" + (widget-prompt widget prompt) + (widget-type widget)) + value unbound))) (while (not (widget-apply widget :match answer)) (setq answer (signal 'error (list "Answer does not match type" answer (widget-type widget))))) @@ -1783,11 +1813,11 @@ (lambda () ;?\] (setq button-end (point-marker)) (set-marker-insertion-type button-end nil)) - (lambda () ;?\{ + (lambda () ;?\{ (setq sample-begin (point))) (lambda () ;?\} (setq sample-end (point))) - (lambda () ;?n + (lambda () ;?n (when (widget-get widget :indent) (insert ?\n) (insert-char ?\ (widget-get widget :indent)))) @@ -2001,7 +2031,7 @@ ;; It would be nice if we could do a `(cons val 1)' here. ;; (prin1-to-string (custom-quote value)))))) ;; XEmacs: make this use default VALUE. Need to check callers. - (eval-minibuffer prompt)) + (eval-minibuffer (concat prompt ": "))) ;;; The `item' Widget. @@ -2224,7 +2254,7 @@ "Read string for WIDGET prompting with PROMPT. INITIAL is the initial input and HISTORY is a symbol containing the earlier input." - (read-string prompt initial history)) + (read-string (concat prompt ": ") initial history)) (defun widget-field-prompt-value (widget prompt value unbound) "Prompt for a string." @@ -2577,6 +2607,7 @@ :value-create 'widget-checklist-value-create :value-delete 'widget-children-value-delete :value-get 'widget-checklist-value-get + :prompt-value 'widget-checklist-prompt-value :validate 'widget-checklist-validate :match 'widget-checklist-match :match-inline 'widget-checklist-match-inline) @@ -2701,6 +2732,27 @@ (setq result (append result (widget-apply child :value-inline))))) result)) +;; #### FIXME: should handle default value some day -- dvl +(defun widget-checklist-prompt-value (widget prompt value unbound) + ;; Prompt for items to be selected, and the prompt for their value + (let* ((args (widget-get widget :args)) + (choices (mapcar (lambda (elt) + (cons (widget-get elt :tag) elt)) + args)) + (continue t) + value) + (while continue + (setq continue (completing-read + (concat (widget-prompt-spaceify prompt) + "select [ret. when done]: ") + choices nil t)) + (if (string= continue "") + (setq continue nil) + (push (widget-prompt-value (cdr (assoc continue choices)) + prompt nil t) + value))) + (nreverse value))) + (defun widget-checklist-validate (widget) ;; Ticked children must be valid. (let ((children (widget-get widget :children)) @@ -3116,6 +3168,7 @@ :value-delete 'widget-children-value-delete :value-get 'widget-editable-list-value-get :default-get 'widget-group-default-get + :prompt-value 'widget-group-prompt-value :validate 'widget-children-validate :match 'widget-group-match :match-inline 'widget-group-match-inline) @@ -3146,6 +3199,36 @@ ;; Get the default of the components. (mapcar 'widget-default-get (widget-get widget :args))) +(defun widget-group-prompt-value (widget prompt value unbound) + ;; Prompt in turn for every component of the group. + (let ((args (widget-get widget :args))) + (widget-apply + widget :value-to-external + (if unbound + (mapcar #'(lambda (arg) + (widget-prompt-value + arg + (concat (widget-prompt-spaceify prompt) + (widget-prompt arg nil "")) + nil t)) + args) + ;; If VALUE is bound, the situation is a bit more complex because we + ;; have to split it into a list of default values for every child. Oh, + ;; boy, do I miss 'cl here... -- dvl + (let ((children args) + (defaults (widget-apply widget + :value-to-internal value)) + child default result) + (while (setq child (pop children)) + (setq default (pop defaults)) + (push + (widget-prompt-value + child + (concat (widget-prompt-spaceify prompt) + (widget-prompt child nil "")) + default) result)) + (nreverse result)))))) + (defun widget-group-match (widget values) ;; Match if the components match. (and (listp values) @@ -3378,7 +3461,7 @@ (defun widget-sexp-prompt-value (widget prompt value unbound) ;; Read an arbitrary sexp. - (let ((found (read-string prompt + (let ((found (read-string (concat prompt ": ") (if unbound nil (cons (prin1-to-string value) 0)) (widget-get widget :prompt-history)))) (save-excursion @@ -3502,8 +3585,8 @@ ;; Read file from minibuffer. (abbreviate-file-name (if unbound - (read-file-name prompt) - (let ((prompt2 (format "%s (default %s) " prompt value)) + (read-file-name (concat prompt ": ")) + (let ((prompt2 (format "%s: (default %s) " prompt value)) (dir (file-name-directory value)) (file (file-name-nondirectory value)) (must-match (widget-get widget :must-match))) @@ -3552,7 +3635,7 @@ (defun widget-symbol-prompt-internal (widget prompt initial history) ;; Read file from minibuffer. - (let ((answer (completing-read prompt obarray + (let ((answer (completing-read (concat prompt ": ") obarray (widget-get widget :prompt-match) nil initial history))) (if (and (stringp answer) @@ -3824,42 +3907,45 @@ (let ((args (widget-get widget :args)) (completion-ignore-case (widget-get widget :case-fold)) current choices old) - ;; Find the first arg that matches VALUE. - (let ((look args)) - (while look - (if (widget-apply (car look) :match value) - (setq old (car look) - look nil) - (setq look (cdr look))))) - ;; Find new choice. + ;; Find the first choice matching VALUE (if given): + (unless unbound + (let ((look args)) + (while look + (if (widget-apply (car look) :match value) + (setq old (car look) + look nil) + (setq look (cdr look))))) + ;; If VALUE is invalid (it doesn't match any choice), discard it by + ;; considering it unbound: + (unless old + (setq unbound t))) + ;; Now offer the choice, providing the given default value when/where + ;; appropriate: + (while args + (setq current (car args) + args (cdr args)) + (setq choices + (cons (cons (widget-apply current :menu-tag-get) + current) + choices))) (setq current - (cond ((= (length args) 0) - nil) - ((= (length args) 1) - (nth 0 args)) - ((and (= (length args) 2) - (memq old args)) - (if (eq old (nth 0 args)) - (nth 1 args) - (nth 0 args))) - (t - (while args - (setq current (car args) - args (cdr args)) - (setq choices - (cons (cons (widget-apply current :menu-tag-get) - current) - choices))) - (let ((val (completing-read prompt choices nil t))) - (if (stringp val) - (let ((try (try-completion val choices))) - (when (stringp try) - (setq val try)) - (cdr (assoc val choices))) - nil))))) + (let ((val (completing-read (concat prompt ": ") choices nil t + (when old + (widget-apply old :menu-tag-get))))) + (if (stringp val) ;; #### is this really needed ? --dvl + (let ((try (try-completion val choices))) + (when (stringp try) ;; #### and this ? --dvl + (setq val try)) + (cdr (assoc val choices))) + nil))) (if current - (widget-prompt-value current prompt nil t) - value))) + (widget-prompt-value current + (concat (widget-prompt-spaceify prompt) + (widget-get current :tag)) + (unless unbound + (when (eq current old) value)) + (or unbound (not (eq current old)))) + (and (not unbound) value)))) (define-widget 'radio 'radio-button-choice "A set widget, selecting exactly one from many. @@ -3891,7 +3977,7 @@ (defun widget-boolean-prompt-value (widget prompt value unbound) ;; Toggle a boolean. - (y-or-n-p prompt)) + (y-or-n-p (concat prompt ": "))) ;;; The `color' Widget. @@ -4002,8 +4088,8 @@ nil, or a cons-cell containing a sexp and my-lisp. This will not work because the `choice' widget does not allow recursion. -Using the `lazy' widget you can overcome this problem, as in this -example: +Using the `lazy' widget you can overcome this problem, as in this +example: (define-widget 'sexp-list 'lazy \"A list of sexps.\" @@ -4012,7 +4098,7 @@ :format "%{%t%}: %v" ;; We don't convert :type because we want to allow recursive ;; datastructures. This is slow, so we should not create speed - ;; critical widgets by deriving from this. + ;; critical widgets by deriving from this. :convert-widget 'widget-value-convert-widget :value-create 'widget-type-value-create :value-delete 'widget-children-value-delete @@ -4041,10 +4127,10 @@ The value of the :type attribute should be an unconverted widget type." (let ((value (widget-get widget :value)) (type (widget-get widget :type))) - (widget-put widget :children - (list (widget-create-child-value widget - (widget-convert type) - value))))) + (widget-put widget :children + (list (widget-create-child-value widget + (widget-convert type) + value))))) (defun widget-type-default-get (widget) "Get default value from the :type attribute of WIDGET. diff -r 71bf2c5667ba -r 66411359ce4e lisp/window-xemacs.el --- a/lisp/window-xemacs.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/window-xemacs.el Sat Oct 25 21:40:46 2008 +0900 @@ -124,7 +124,8 @@ pixel-left pixel-top pixel-right pixel-bottom hscroll modeline-hscroll dedicatedp - first-hchild first-vchild next-child) + first-hchild first-vchild next-child + window) (defstruct window-configuration frame @@ -135,6 +136,10 @@ min-width min-height saved-root-window) +; make sure we don't get affected by harmful advice +(fset 'real-split-window (symbol-function 'split-window)) +(fset 'real-delete-window (symbol-function 'delete-window)) + (defun window-configuration-equal (conf-1 conf-2) "Returns a boolean indicating whether the two given configurations are identical. @@ -256,6 +261,7 @@ (bottom (nth 3 edges))) (let ((saved-window (make-saved-window + :window window :currentp (eq window (selected-window (window-frame window))) :minibufferp (eq window (minibuffer-window (window-frame window))) :minibuffer-scrollp (eq window minibuffer-scroll-window) @@ -278,19 +284,47 @@ (let ((marker (make-marker))) (set-marker marker (window-start window) buffer) (setf (saved-window-start-marker saved-window) marker)) - (let ((marker (make-marker))) - (if (eq window (selected-window)) - (set-marker marker (point buffer) buffer) - (set-marker marker (window-point window) buffer)) - (setf (saved-window-point-marker saved-window) marker)) + (if (not (eq buffer (current-buffer))) + (let ((marker (make-marker))) + (set-marker marker (window-point window) buffer) + (setf (saved-window-point-marker saved-window) marker))) (setf (saved-window-mark-marker saved-window) (copy-marker (mark-marker t buffer))))) saved-window)))) +(defmacro save-window-excursion/mapping (&rest body) + "Execute body, preserving window sizes and contents. +Restores which buffer appears in which window, where display starts, +as well as the current buffer. +Return alist mapping old windows to new windows. +This alist maps the originally captured windows to the windows that correspond +to them in the restored configuration. It does not include entries for +windows that have not changed identity. +Does not restore the value of point in current buffer." + (let ((window-config (gensym 'window-config)) + (mapping (gensym 'mapping))) + `(let ((,window-config (current-window-configuration)) + (,mapping)) + (unwind-protect + (progn ,@body) + (setq ,mapping (set-window-configuration/mapping ,window-config))) + ,mapping))) + (defun set-window-configuration (configuration) "Set the configuration of windows and buffers as specified by CONFIGURATION. CONFIGURATION must be a value previously returned by `current-window-configuration'." + (set-window-configuration/mapping configuration) + nil) ; make sure nobody relies on mapping return value + +(defun set-window-configuration/mapping (configuration) + "Set the configuration of windows and buffers as specified by CONFIGURATION. +CONFIGURATION must be a value previously returned +by `current-window-configuration'. +Return alist mapping old windows to new windows. +This alist maps the originally captured windows to the windows that correspond +to them in the restored configuration. It does not include entries for +windows that have not changed identity." (let ((frame (window-configuration-frame configuration))) (if (and (frame-live-p frame) (not (window-configuration-equal configuration @@ -298,7 +332,8 @@ (really-set-window-configuration frame configuration)))) (defun really-set-window-configuration (frame configuration) - "Set the window configuration CONFIGURATION on live frame FRAME." + "Set the window configuration CONFIGURATION on live frame FRAME. +Return alist mapping old windows to new windows." ;; avoid potential temporary problems (setq window-min-width 0) (setq window-min-height 0) @@ -329,22 +364,26 @@ ;; the selected window (select-window (minibuffer-window frame)) - (let ((window-configuration-current-window nil)) + (let ((window-configuration-current-window nil) + (mapping (list nil))) ; poor man's box + (declare (special window-configuration-current-window)) (restore-saved-window configuration root-window (window-configuration-saved-root-window configuration) - 'vertical) + 'vertical + mapping) (if window-configuration-current-window - (select-window window-configuration-current-window)))) - - (setq window-min-width (window-configuration-min-width configuration)) - (setq window-min-height (window-configuration-min-height configuration)) - - (let ((buffer (window-configuration-current-buffer configuration))) - (if (buffer-live-p buffer) - (set-buffer buffer) - (set-buffer (car (buffer-list)))))) + (select-window window-configuration-current-window)) + + (setq window-min-width (window-configuration-min-width configuration)) + (setq window-min-height (window-configuration-min-height configuration)) + + (let ((buffer (window-configuration-current-buffer configuration))) + (if (buffer-live-p buffer) + (set-buffer buffer) + (set-buffer (car (buffer-list))))) + (car mapping)))) (defun set-window-configuration-frame-size (configuration) "Restore the frame size of a window configuration." @@ -370,7 +409,7 @@ (while window (if (window-live-p window) (let ((next (window-next-child window))) - (delete-window window) + (real-delete-window window) (setq window next))))) (cond ((window-first-hchild window) @@ -378,33 +417,43 @@ ((window-first-vchild window) (window-reduce-to-one (window-first-vchild window))))) -(defun restore-saved-window (configuration window saved-window direction) - "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW." - (and (saved-window-next-child saved-window) - (not (saved-window-minibufferp (saved-window-next-child saved-window))) - (progn - (cond ((eq direction 'vertical) - (split-window window nil nil)) - ((eq direction 'horizontal) - (split-window window nil t))) - (restore-saved-window configuration - (window-next-child window) - (saved-window-next-child saved-window) - direction))) +(defun restore-saved-window (configuration window saved-window direction mapping) + "Within CONFIGURATION, restore WINDOW to the state of SAVED-WINDOW. +MAPPING is a one-element list whose element is an old-window-to-new-window +mapping, which this function will extend." + (if (not (eq (saved-window-window saved-window) window)) + (rplaca mapping + (cons (cons (saved-window-window saved-window) window) + (car mapping)))) + (cond + ((and (saved-window-next-child saved-window) + (not (saved-window-minibufferp (saved-window-next-child saved-window)))) + (cond ((eq direction 'vertical) + (real-split-window window nil nil)) + ((eq direction 'horizontal) + (real-split-window window nil t))) + (if (not (saved-window-minibufferp saved-window)) + (restore-saved-window-parameters configuration window saved-window)) + (restore-saved-window configuration + (window-next-child window) + (saved-window-next-child saved-window) + direction + mapping)) + ((not (saved-window-minibufferp saved-window)) + (restore-saved-window-parameters configuration window saved-window))) (if (saved-window-first-hchild saved-window) (restore-saved-window configuration window (saved-window-first-hchild saved-window) - 'horizontal)) + 'horizontal + mapping)) (if (saved-window-first-vchild saved-window) (restore-saved-window configuration window (saved-window-first-vchild saved-window) - 'vertical)) - - (if (not (saved-window-minibufferp saved-window)) - (restore-saved-window-parameters configuration window saved-window))) + 'vertical + mapping))) (defun restore-saved-window-parameters (configuration window saved-window) "Restore the window parameters stored in SAVED-WINDOW on WINDOW." @@ -417,8 +466,9 @@ (set-window-start window (marker-position (saved-window-start-marker saved-window)) t) - (set-window-point window - (marker-position (saved-window-point-marker saved-window))) + (if (markerp (saved-window-point-marker saved-window)) + (set-window-point window + (marker-position (saved-window-point-marker saved-window)))) (set-marker (mark-marker t buffer) (marker-position (saved-window-mark-marker saved-window)) buffer) diff -r 71bf2c5667ba -r 66411359ce4e lisp/window.el --- a/lisp/window.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/window.el Sat Oct 25 21:40:46 2008 +0900 @@ -33,16 +33,19 @@ ;;;; Window tree functions. -(defun one-window-p (&optional nomini which-frames which-devices) - "Return non-nil if the selected window is the only window (in its frame). -Optional arg NOMINI non-nil means don't count the minibuffer -even if it is active. +;; XEmacs addition, to expose WINDOW. +(defun only-window-p (&optional window nomini which-frames which-devices) + "Return non-nil if WINDOW is the only window in some context, +normally its frame. Optional arg NOMINI non-nil means don't count the +minibuffer even if it is active. -By default, only the windows in the selected frame are considered. -The optional argument WHICH-FRAMES changes this behavior: -WHICH-FRAMES nil or omitted means count only the selected frame, +The optional argument WHICH-FRAMES changes the frames that are considered: + +WHICH-FRAMES nil or omitted means count only WINDOW's frame, plus the minibuffer it uses (which may be on another frame). -WHICH-FRAMES = `visible' means include windows on all visible frames. +\(But, for all values of WHICH-FRAMES, see the documentation for the +WHICH-DEVICES argument.) +WHICH-FRAMES = `visible' means include windows on all visible frames WHICH-FRAMES = 0 means include windows on all visible and iconified frames. WHICH-FRAMES = t means include windows on all frames including invisible frames. If WHICH-FRAMES is any other value, count only the selected frame. @@ -56,12 +59,20 @@ If a device type, search all devices of that type. If `window-system', search all devices on window-system consoles. Any other non-nil value means search all devices." - (let ((base-window (selected-window))) - (if (and nomini (eq base-window (minibuffer-window))) + (let ((base-window (or window (selected-window)))) + (if (and nomini (eq base-window + (minibuffer-window (window-frame base-window)))) (setq base-window (next-window base-window))) (eq base-window (next-window base-window (if nomini 'arg) which-frames which-devices)))) +(defun one-window-p (&optional nomini which-frames which-devices) + "Return the result of calling `only-window-p' on the selected window. + +See that function's documentation for the meaning of the NOMINI, +WHICH-FRAMES and WHICH-DEVICES arguments." + (only-window-p (selected-window) nomini which-frames which-devices)) + (defun walk-windows (function &optional minibuf which-frames which-devices) "Cycle through all visible windows, calling FUNCTION for each one. FUNCTION is called with a window as argument. @@ -351,24 +362,18 @@ (interactive "p") (shrink-window arg t)) -; (defun window-buffer-height (window) -; "Return the height (in screen lines) of the buffer that WINDOW is displaying." -; (save-excursion -; (set-buffer (window-buffer window)) -; (goto-char (point-min)) -; (let ((ignore-final-newline -; ;; If buffer ends with a newline, ignore it when counting height -; ;; unless point is after it. -; (and (not (eobp)) (eq ?\n (char-after (1- (point-max))))))) -; (+ 1 (nth 2 (compute-motion (point-min) -; '(0 . 0) -; (- (point-max) (if ignore-final-newline 1 0)) -; (cons 0 100000000) -; (window-width window) -; nil -; window)))))) - -(defun count-screen-lines (&optional beg end count-final-newline window) +(defun window-buffer-height (window) + "Return the height (in screen lines) of the buffer that WINDOW is displaying." + (with-current-buffer (window-buffer window) + (max 1 + (count-screen-lines (point-min) (point-max) + ;; If buffer ends with a newline, ignore it when + ;; counting height unless point is after it. + (eobp) + window)))) +;; XEmacs change; accept BUFFER. +(defun count-screen-lines (&optional beg end count-final-newline + window buffer) "Return the number of screen lines in the region. The number of screen lines may be different from the number of actual lines, due to line breaking, display table, etc. @@ -383,112 +388,120 @@ parameters such as width, horizontal scrolling, and so on. The default is to use the selected window's parameters. -Like `vertical-motion', `count-screen-lines' always uses the current buffer, -regardless of which buffer is displayed in WINDOW. This makes possible to use -`count-screen-lines' in any buffer, whether or not it is currently displayed -in some window." +Optional argument BUFFER is the buffer to check, and defaults to the current +buffer. See `vertical-motion' for some caveats on the differences between +this behaviour and that of GNU Emacs." (unless beg - (setq beg (point-min))) + (setq beg (point-min buffer))) (unless end - (setq end (point-max))) + (setq end (point-max buffer))) + (unless buffer + (setq buffer (current-buffer))) (if (= beg end) 0 (save-excursion (save-restriction - (widen) - (narrow-to-region (min beg end) - (if (and (not count-final-newline) - (= ?\n (char-before (max beg end)))) - (1- (max beg end)) - (max beg end))) - (goto-char (point-min)) - (1+ (vertical-motion (buffer-size) window)))))) + (let ((old-window-buffer (window-buffer window))) + (unwind-protect + (progn + (set-window-buffer window buffer) + (set-buffer buffer) + (widen) + (narrow-to-region (min beg end) + (if (and (not count-final-newline) + (= ?\n (char-before (max beg end)))) + (1- (max beg end)) + (max beg end))) + (goto-char (point-min)) + (1+ (vertical-motion (buffer-size) window))) + (set-window-buffer window old-window-buffer))))))) -; (defun fit-window-to-buffer (&optional window max-height min-height) -; "Make WINDOW the right size to display its contents exactly. -; If WINDOW is omitted or nil, it defaults to the selected window. -; If the optional argument MAX-HEIGHT is supplied, it is the maximum height -; the window is allowed to be, defaulting to the frame height. -; If the optional argument MIN-HEIGHT is supplied, it is the minimum -; height the window is allowed to be, defaulting to `window-min-height'. +(defun fit-window-to-buffer (&optional window max-height min-height) + "Make WINDOW the right height to display its contents exactly. +If WINDOW is omitted or nil, it defaults to the selected window. +If the optional argument MAX-HEIGHT is supplied, it is the maximum height + the window is allowed to be, defaulting to the frame height. +If the optional argument MIN-HEIGHT is supplied, it is the minimum + height the window is allowed to be, defaulting to `window-min-height'. -; The heights in MAX-HEIGHT and MIN-HEIGHT include the mode-line and/or -; header-line." -; (interactive) +The heights in MAX-HEIGHT and MIN-HEIGHT include the mode-line and/or +header-line." + (interactive) -; (when (null window) -; (setq window (selected-window))) -; (when (null max-height) -; (setq max-height (frame-height (window-frame window)))) + (when (null window) + (setq window (selected-window))) + (when (null max-height) + (setq max-height (frame-height (window-frame window)))) -; (let* ((buf -; ;; Buffer that is displayed in WINDOW -; (window-buffer window)) -; (window-height -; ;; The current height of WINDOW -; (window-height window)) -; (desired-height -; ;; The height necessary to show the buffer displayed by WINDOW -; ;; (`count-screen-lines' always works on the current buffer). -; (with-current-buffer buf -; (+ (count-screen-lines) -; ;; If the buffer is empty, (count-screen-lines) is -; ;; zero. But, even in that case, we need one text line -; ;; for cursor. -; (if (= (point-min) (point-max)) -; 1 0) -; ;; For non-minibuffers, count the mode-line, if any -; (if (and (not (window-minibuffer-p window)) -; mode-line-format) -; 1 0) -; ;; Count the header-line, if any -; (if header-line-format 1 0)))) -; (delta -; ;; Calculate how much the window height has to change to show -; ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. -; (- (max (min desired-height max-height) -; (or min-height window-min-height)) -; window-height)) -; ;; We do our own height checking, so avoid any restrictions due to -; ;; window-min-height. -; (window-min-height 1)) + (let* ((buf + ;; Buffer that is displayed in WINDOW + (window-buffer window)) + (window-height + ;; The current height of WINDOW + (window-height window)) + (desired-height + ;; The height necessary to show the buffer displayed by WINDOW + ;; (`count-screen-lines' always works on the current buffer). + ;; XEmacs; it does in GNU, we provide a BUFFER argument, but we're + ;; not changing the implementation. + (with-current-buffer buf + (+ (count-screen-lines) + ;; If the buffer is empty, (count-screen-lines) is + ;; zero. But, even in that case, we need one text line + ;; for cursor. + (if (= (point-min) (point-max)) + 1 0) + ;; For non-minibuffers, count the mode-line, if any + (if (and (not (window-minibuffer-p window)) + mode-line-format) + 1 0) + ;; Count the header-line, if any + ;; XEmacs change; we don't have header-line-format. + ;; (if header-line-format 1 0)))) + (if (specifier-instance top-gutter) 1 0)))) + (delta + ;; Calculate how much the window height has to change to show + ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. + (- (max (min desired-height max-height) + (or min-height window-min-height)) + window-height))) -; ;; Don't try to redisplay with the cursor at the end -; ;; on its own line--that would force a scroll and spoil things. -; (when (with-current-buffer buf -; (and (eobp) (bolp) (not (bobp)))) -; (set-window-point window (1- (window-point window)))) + ;; Don't try to redisplay with the cursor at the end + ;; on its own line--that would force a scroll and spoil things. + (when (with-current-buffer buf + (and (eobp) (bolp) (not (bobp)))) + (set-window-point window (1- (window-point window)))) -; (save-selected-window -; (select-window window) - -; ;; Adjust WINDOW to the nominally correct size (which may actually -; ;; be slightly off because of variable height text, etc). -; (unless (zerop delta) -; (enlarge-window delta)) + ;; Adjust WINDOW to the nominally correct size (which may actually + ;; be slightly off because of variable height text, etc). + (unless (zerop delta) + (enlarge-window delta nil window)) -; ;; Check if the last line is surely fully visible. If not, -; ;; enlarge the window. -; (let ((end (with-current-buffer buf -; (save-excursion -; (goto-char (point-max)) -; (when (and (bolp) (not (bobp))) -; ;; Don't include final newline -; (backward-char 1)) -; (when truncate-lines -; ;; If line-wrapping is turned off, test the -; ;; beginning of the last line for visibility -; ;; instead of the end, as the end of the line -; ;; could be invisible by virtue of extending past -; ;; the edge of the window. -; (forward-line 0)) -; (point))))) -; (set-window-vscroll window 0) -; (while (and (< desired-height max-height) -; (= desired-height (window-height window)) -; (not (pos-visible-in-window-p end window))) -; (enlarge-window 1) -; (setq desired-height (1+ desired-height))))))) + ;; Check if the last line is surely fully visible. If not, + ;; enlarge the window. + (let ((end (with-current-buffer buf + (save-excursion + (goto-char (point-max)) + (when (and (bolp) (not (bobp))) + ;; Don't include final newline + (backward-char 1)) + (when truncate-lines + ;; If line-wrapping is turned off, test the + ;; beginning of the last line for visibility + ;; instead of the end, as the end of the line + ;; could be invisible by virtue of extending past + ;; the edge of the window. + (forward-line 0)) + (point)))) + ;; XEmacs change; bind window-pixel-vscroll-increment, we don't + ;; have #'set-window-vscroll. + (window-pixel-scroll-increment 0)) + ; (set-window-vscroll window 0) + (while (and (< desired-height max-height) + (= desired-height (window-height window)) + (not (pos-visible-in-window-p end window))) + (enlarge-window 1 nil window) + (setq desired-height (1+ desired-height)))))) (defun shrink-window-if-larger-than-buffer (&optional window) "Shrink the WINDOW to be as small as possible to display its contents. diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-compose.el --- a/lisp/x-compose.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-compose.el Sat Oct 25 21:40:46 2008 +0900 @@ -102,7 +102,8 @@ ;; Giacomo Boffi's problem of ;; 20050324103919.8D22E4901@boffi95.stru.polimi.it is caused by Xlib doing -;; the compose processing. To turn that off, I'm not certain what's +;; the compose processing. To turn that off, I'm not certain what's +;; possible, beyond making C the current locale. ;;; Code: diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-faces.el --- a/lisp/x-faces.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-faces.el Sat Oct 25 21:40:46 2008 +0900 @@ -533,7 +533,7 @@ (fc-name-unparse copy)))))))) (defun x-find-smaller-font-xft (font &optional device) - (x-find-xft-font-of-size font '(lambda (old-size) (- old-size 1.0)) device)) + (x-find-xft-font-of-size font #'(lambda (old-size) (- old-size 1.0)) device)) (defun x-find-smaller-font-core (font &optional device) (x-frob-font-size font nil device)) @@ -550,7 +550,7 @@ (x-find-larger-font-core font device))) (defun x-find-larger-font-xft (font &optional device) - (x-find-xft-font-of-size font '(lambda (old-size) (+ old-size 1.0)) device)) + (x-find-xft-font-of-size font #'(lambda (old-size) (+ old-size 1.0)) device)) (defun x-find-larger-font-core (font &optional device) (x-frob-font-size font t device)) @@ -603,6 +603,15 @@ (defvar x-color-list-internal-cache) +;; Ben originally coded this in 2005/01 to return a list of lists each +;; containing a single string. This is apparently derived from use of +;; this list in completion, but in fact `read-color-completion-table' +;; already does this wrapping. So I'm changing this to return a list of +;; strings as the TTY code does, and as expected by r-c-c-t. +;; -- sjt 2007-10-06 + +;; This function is probably also used by the GTK platform. Cf. +;; gtk_color_list in src/objects-gtk.c. (defun x-color-list-internal () (if (boundp 'x-color-list-internal-cache) x-color-list-internal-cache @@ -623,12 +632,12 @@ (setq p (point)) (end-of-line) (setq color (buffer-substring p (point)) - clist (cons (list color) clist)) + clist (cons color clist)) ;; Ugh. If we want to be able to complete the lowercase form ;; of the color name, we need to add it twice! Yuck. (let ((dcase (downcase color))) (or (string= dcase color) - (push (list dcase) clist))) + (push dcase clist))) (forward-char 1)) (kill-buffer (current-buffer)))) (setq x-color-list-internal-cache clist) @@ -654,7 +663,11 @@ ;;; result in a crash. ;; When we initialise a face from an X resource, note that we did so. -(define-specifier-tag 'x-resource) +;; +;; Now in specifier.el so run-time checks for it on non-X builds don't +;; error. + +; (define-specifier-tag 'x-resource) (defun x-init-face-from-resources (face &optional locale set-anyway) diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-font-menu.el --- a/lisp/x-font-menu.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-font-menu.el Sat Oct 25 21:40:46 2008 +0900 @@ -42,8 +42,28 @@ x-font-regexp-foundry-and-family x-font-regexp-spacing)) -(globally-declare-fboundp - '(charset-registries)) +(globally-declare-boundp + '(charset-registries + fc-find-available-font-families + fc-find-available-weights-for-family + fc-font-match + fc-font-slant-translate-from-string + fc-font-slant-translate-to-string + fc-font-weight-translate-from-string + fc-font-weight-translate-to-string + fc-name-parse + fc-name-unparse + fc-pattern-add-family + fc-pattern-add-size + fc-pattern-add-slant + fc-pattern-add-weight + fc-pattern-get-family + fc-pattern-get-size + fc-pattern-get-slant + fc-pattern-get-successp + fc-pattern-get-weight + make-fc-pattern + xlfd-font-name-p)) (defvar x-font-menu-registry-encoding nil "Registry and encoding to use with font menu fonts.") diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-init.el --- a/lisp/x-init.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-init.el Sat Oct 25 21:40:46 2008 +0900 @@ -37,7 +37,7 @@ x-server-vendor x-init-specifier-from-resources init-mule-x-win)) (globally-declare-boundp - '(x-initial-argv-list)) + '(x-initial-argv-list x-app-defaults-directory)) ;; If you want to change this variable, this is the place you must do it. ;; Do not set it to a string containing periods. X doesn't like that. @@ -84,14 +84,8 @@ ;; Load X-server specific code. ;; Specifically, load some code to repair the grievous damage that MIT and ;; Sun have done to the default keymap for the Sun keyboards. - -(eval-when-compile - (defmacro x-define-dead-key (key map) - `(when (x-keysym-on-keyboard-p ',key) - (define-key function-key-map [,key] ',map)))) - -(defun x-initialize-compose () - "Enable compose key and dead key processing." +(defun x-initialize-compose (device) + "Enable compose key and dead key processing on DEVICE." (autoload 'compose-map "x-compose" nil t 'keymap) (autoload 'compose-acute-map "x-compose" nil t 'keymap) (autoload 'compose-grave-map "x-compose" nil t 'keymap) @@ -100,117 +94,124 @@ (autoload 'compose-circumflex-map "x-compose" nil t 'keymap) (autoload 'compose-tilde-map "x-compose" nil t 'keymap) - (when (x-keysym-on-keyboard-p 'multi-key) - (define-key function-key-map [multi-key] 'compose-map)) + (loop + for (key map) + ;; The dead keys might really be called just about anything, depending + ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and + ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3 + ;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_". + ;; And HP (who don't mention Sun and DEC at all) use "XK_mute_". Go + ;; figure. + + ;; Presumably if someone is running OpenWindows, they won't be using the + ;; DEC or HP keysyms, but if they are defined then that is possible, so + ;; in that case we accept them all. - ;; The dead keys might really be called just about anything, depending - ;; on the vendor. MIT thinks that the prefixes are "SunFA_", "D", and - ;; "hpmute_" for Sun, DEC, and HP respectively. However, OpenWindows 3 - ;; thinks that the prefixes are "SunXK_FA_", "DXK_", and "hpXK_mute_". - ;; And HP (who don't mention Sun and DEC at all) use "XK_mute_". - ;; Go figure. + ;; If things seem not to be working, you might want to check your + ;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally + ;; mixed up view of what these keys should be called. - ;; Presumably if someone is running OpenWindows, they won't be using - ;; the DEC or HP keysyms, but if they are defined then that is possible, - ;; so in that case we accept them all. - - ;; If things seem not to be working, you might want to check your - ;; /usr/lib/X11/XKeysymDB file to see if your vendor has an equally - ;; mixed up view of what these keys should be called. + ;; Canonical names: + in '((acute compose-acute-map) + (grave compose-grave-map) + (cedilla compose-cedilla-map) + (diaeresis compose-diaeresis-map) + (circumflex compose-circumflex-map) + (tilde compose-tilde-map) + (degree compose-ring-map) + (multi-key compose-map) - ;; Canonical names: - (x-define-dead-key acute compose-acute-map) - (x-define-dead-key grave compose-grave-map) - (x-define-dead-key cedilla compose-cedilla-map) - (x-define-dead-key diaeresis compose-diaeresis-map) - (x-define-dead-key circumflex compose-circumflex-map) - (x-define-dead-key tilde compose-tilde-map) - (x-define-dead-key degree compose-ring-map) + ;; Sun according to MIT: + (SunFA_Acute compose-acute-map) + (SunFA_Grave compose-grave-map) + (SunFA_Cedilla compose-cedilla-map) + (SunFA_Diaeresis compose-diaeresis-map) + (SunFA_Circum compose-circumflex-map) + (SunFA_Tilde compose-tilde-map) + + ;; Sun according to OpenWindows 2: + (Dead_Grave compose-grave-map) + (Dead_Circum compose-circumflex-map) + (Dead_Tilde compose-tilde-map) - ;; Sun according to MIT: - (x-define-dead-key SunFA_Acute compose-acute-map) - (x-define-dead-key SunFA_Grave compose-grave-map) - (x-define-dead-key SunFA_Cedilla compose-cedilla-map) - (x-define-dead-key SunFA_Diaeresis compose-diaeresis-map) - (x-define-dead-key SunFA_Circum compose-circumflex-map) - (x-define-dead-key SunFA_Tilde compose-tilde-map) + ;; Sun according to OpenWindows 3: + (SunXK_FA_Acute compose-acute-map) + (SunXK_FA_Grave compose-grave-map) + (SunXK_FA_Cedilla compose-cedilla-map) + (SunXK_FA_Diaeresis compose-diaeresis-map) + (SunXK_FA_Circum compose-circumflex-map) + (SunXK_FA_Tilde compose-tilde-map) - ;; Sun according to OpenWindows 2: - (x-define-dead-key Dead_Grave compose-grave-map) - (x-define-dead-key Dead_Circum compose-circumflex-map) - (x-define-dead-key Dead_Tilde compose-tilde-map) - - ;; Sun according to OpenWindows 3: - (x-define-dead-key SunXK_FA_Acute compose-acute-map) - (x-define-dead-key SunXK_FA_Grave compose-grave-map) - (x-define-dead-key SunXK_FA_Cedilla compose-cedilla-map) - (x-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map) - (x-define-dead-key SunXK_FA_Circum compose-circumflex-map) - (x-define-dead-key SunXK_FA_Tilde compose-tilde-map) + ;; DEC according to MIT: + (Dacute_accent compose-acute-map) + (Dgrave_accent compose-grave-map) + (Dcedilla_accent compose-cedilla-map) + (Dcircumflex_accent compose-circumflex-map) + (Dtilde compose-tilde-map) + (Dring_accent compose-ring-map) - ;; DEC according to MIT: - (x-define-dead-key Dacute_accent compose-acute-map) - (x-define-dead-key Dgrave_accent compose-grave-map) - (x-define-dead-key Dcedilla_accent compose-cedilla-map) - (x-define-dead-key Dcircumflex_accent compose-circumflex-map) - (x-define-dead-key Dtilde compose-tilde-map) - (x-define-dead-key Dring_accent compose-ring-map) + ;; DEC according to OpenWindows 3: + (DXK_acute_accent compose-acute-map) + (DXK_grave_accent compose-grave-map) + (DXK_cedilla_accent compose-cedilla-map) + (DXK_circumflex_accent compose-circumflex-map) + (DXK_tilde compose-tilde-map) + (DXK_ring_accent compose-ring-map) - ;; DEC according to OpenWindows 3: - (x-define-dead-key DXK_acute_accent compose-acute-map) - (x-define-dead-key DXK_grave_accent compose-grave-map) - (x-define-dead-key DXK_cedilla_accent compose-cedilla-map) - (x-define-dead-key DXK_circumflex_accent compose-circumflex-map) - (x-define-dead-key DXK_tilde compose-tilde-map) - (x-define-dead-key DXK_ring_accent compose-ring-map) + ;; HP according to MIT: + (hpmute_acute compose-acute-map) + (hpmute_grave compose-grave-map) + (hpmute_diaeresis compose-diaeresis-map) + (hpmute_asciicircum compose-circumflex-map) + (hpmute_asciitilde compose-tilde-map) - ;; HP according to MIT: - (x-define-dead-key hpmute_acute compose-acute-map) - (x-define-dead-key hpmute_grave compose-grave-map) - (x-define-dead-key hpmute_diaeresis compose-diaeresis-map) - (x-define-dead-key hpmute_asciicircum compose-circumflex-map) - (x-define-dead-key hpmute_asciitilde compose-tilde-map) + ;; Empirically discovered on Linux XFree86 MetroX: + (usldead_acute compose-acute-map) + (usldead_grave compose-grave-map) + (usldead_diaeresis compose-diaeresis-map) + (usldead_asciicircum compose-circumflex-map) + (usldead_asciitilde compose-tilde-map) - ;; Empirically discovered on Linux XFree86 MetroX: - (x-define-dead-key usldead_acute compose-acute-map) - (x-define-dead-key usldead_grave compose-grave-map) - (x-define-dead-key usldead_diaeresis compose-diaeresis-map) - (x-define-dead-key usldead_asciicircum compose-circumflex-map) - (x-define-dead-key usldead_asciitilde compose-tilde-map) + ;; HP according to OpenWindows 3: + (hpXK_mute_acute compose-acute-map) + (hpXK_mute_grave compose-grave-map) + (hpXK_mute_diaeresis compose-diaeresis-map) + (hpXK_mute_asciicircum compose-circumflex-map) + (hpXK_mute_asciitilde compose-tilde-map) - ;; HP according to OpenWindows 3: - (x-define-dead-key hpXK_mute_acute compose-acute-map) - (x-define-dead-key hpXK_mute_grave compose-grave-map) - (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map) - (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map) - (x-define-dead-key hpXK_mute_asciitilde compose-tilde-map) + ;; HP according to HP-UX 8.0: + (XK_mute_acute compose-acute-map) + (XK_mute_grave compose-grave-map) + (XK_mute_diaeresis compose-diaeresis-map) + (XK_mute_asciicircum compose-circumflex-map) + (XK_mute_asciitilde compose-tilde-map) - ;; HP according to HP-UX 8.0: - (x-define-dead-key XK_mute_acute compose-acute-map) - (x-define-dead-key XK_mute_grave compose-grave-map) - (x-define-dead-key XK_mute_diaeresis compose-diaeresis-map) - (x-define-dead-key XK_mute_asciicircum compose-circumflex-map) - (x-define-dead-key XK_mute_asciitilde compose-tilde-map) - - ;; [[ XFree86 seems to use lower case and a hyphen ]] Not true; they use - ;; lower case and an underscore. XEmacs converts the underscore to a - ;; hyphen in x_keysym_to_emacs_keysym because the keysym is in the - ;; "Keyboard" character set, which is just totally fucking random, - ;; considering it doesn't happen for any other character sets. - (x-define-dead-key dead-acute compose-acute-map) - (x-define-dead-key dead-grave compose-grave-map) - (x-define-dead-key dead-cedilla compose-cedilla-map) - (x-define-dead-key dead-diaeresis compose-diaeresis-map) - (x-define-dead-key dead-circum compose-circumflex-map) - (x-define-dead-key dead-circumflex compose-circumflex-map) - (x-define-dead-key dead-tilde compose-tilde-map) - ) + ;; [[ XFree86 seems to use lower case and a hyphen ]] Not true; + ;; they use lower case and an underscore. XEmacs converts the + ;; underscore to a hyphen in x_keysym_to_emacs_keysym because the + ;; keysym is in the "Keyboard" character set, which is just totally + ;; fucking random, considering it doesn't happen for any other + ;; character sets. + (dead-acute compose-acute-map) + (dead-grave compose-grave-map) + (dead-cedilla compose-cedilla-map) + (dead-diaeresis compose-diaeresis-map) + (dead-circum compose-circumflex-map) + (dead-circumflex compose-circumflex-map) + (dead-tilde compose-tilde-map)) + + ;; Get the correct value for function-key-map + with function-key-map = (symbol-value-in-console 'function-key-map + (device-console device) + function-key-map) + do (when (x-keysym-on-keyboard-p key device) + (define-key function-key-map (vector key) map)))) (eval-when-compile (load "x-win-sun" nil t) (load "x-win-xfree86" nil t)) -(defun x-initialize-keyboard () +(defun x-initialize-keyboard (device) "Perform X-Server-specific initializations. Don't call this." ;; This is some heuristic junk that tries to guess whether this is ;; a Sun keyboard. @@ -224,17 +225,17 @@ ;; Note that we cannot use most vendor-provided proprietary keyboard ;; APIs to identify the keyboard - those only work on the console. ;; xkeycaps has the same problem when running `remotely'. - (let ((vendor (x-server-vendor))) + (let ((vendor (x-server-vendor device))) (cond ((or (string-match "Sun Microsystems" vendor) ;; MIT losingly fails to tell us what hardware the X server ;; is managing, so assume all MIT displays are Suns... HA HA! (string-equal "MIT X Consortium" vendor) (string-equal "X Consortium" vendor)) ;; Ok, we think this could be a Sun keyboard. Run the Sun code. - (x-win-init-sun)) - ((string-match "XFree86" vendor) + (x-win-init-sun device)) + ((string-match #r"XFree86\|Cygwin/X\|The X\.Org Foundation" vendor) ;; Those XFree86 people do some weird keysym stuff, too. - (x-win-init-xfree86))))) + (x-win-init-xfree86 device))))) ;; Moved from x-toolbar.el, since InfoDock doesn't dump x-toolbar.el. (defun x-init-toolbar-from-resources (locale) @@ -252,69 +253,48 @@ (x-init-specifier-from-resources specifier 'natnum locale (cons resname (upcase-initials resname))))) -(defvar pre-x-win-initted nil) +(defvar make-device-early-x-entry-point-called-p nil + "Whether `make-device-early-x-entry-point' has been called, at least once. + +Much of the X11-specific Lisp init code should only be called the first time +an X11 device is created; this variable allows for that.") -(defun init-pre-x-win () - "Initialize X Windows at startup (pre). Don't call this." - (when (not pre-x-win-initted) - (setq initial-frame-plist (if initial-frame-unmapped-p - '(initially-unmapped t) - nil)) - (setq pre-x-win-initted t))) +(defvar make-device-late-x-entry-point-called-p nil + "Whether `make-device-late-x-entry-point' has been called, at least once. -(defvar x-win-initted nil) - -(defun init-x-win () - "Initialize X Windows at startup. Don't call this." - (when (not x-win-initted) - (defvar x-app-defaults-directory) - (init-pre-x-win) - (if (featurep 'mule) (init-mule-x-win)) +Much of the X11-specific Lisp init code should only be called the first time +an X11 device is created; this variable allows for that.") - ;; Open the X display when this file is loaded - ;; (Note that the first frame is created later.) - (setq x-initial-argv-list (cons (car command-line-args) - command-line-args-left)) - ;; Locate the app-defaults directory - (when (and (boundp 'x-app-defaults-directory) - (null x-app-defaults-directory)) - (setq x-app-defaults-directory - (locate-data-directory "app-defaults"))) - (make-x-device nil) +(defun make-device-early-x-entry-point () + "Entry point to set up the Lisp environment for X device creation." + (unless make-device-early-x-entry-point-called-p + (setq initial-frame-plist + (and initial-frame-unmapped-p '(initially-unmapped t)) + ;; Save the argv value. + x-initial-argv-list + (cons (car command-line-args) command-line-args-left) + ;; Locate the app-defaults directory + x-app-defaults-directory + (or x-app-defaults-directory (locate-data-directory "app-defaults")) + make-device-early-x-entry-point-called-p t))) + +(defun make-device-late-x-entry-point (device) + "Entry point to do any Lisp-level X device-specific initialization." + ;; General code, called on every X device created: + (x-initialize-keyboard device) + (x-initialize-compose device) + ;; And the following code is to be called once, the first time an X11 + ;; device is created: + (unless make-device-late-x-entry-point-called-p (setq command-line-args-left (cdr x-initial-argv-list)) - (setq x-win-initted t))) - -(defvar post-x-win-initted nil) - -(defun init-post-x-win () - "Initialize X Windows at startup (post). Don't call this." - (when (not post-x-win-initted) - ;(if (featurep 'mule) (init-mule-x-win)) ;; Motif-ish bindings - ;; The following two were generally unliked. - ;;(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) ;; These are Sun-isms. (define-key global-map 'copy 'copy-primary-selection) (define-key global-map 'paste 'yank-clipboard-selection) (define-key global-map 'cut 'kill-primary-selection) - - ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI - - (setq post-x-win-initted t))) - -;;; Keyboard initialization needs to be done differently for each X -;;; console, so use create-console-hook. -(when (featurep 'x) - (add-hook - 'create-console-hook - (lambda (console) - (letf (((selected-console) console)) - (when (eq 'x (console-type console)) - (x-initialize-keyboard) - (x-initialize-compose)))))) + (setq make-device-late-x-entry-point-called-p t))) (defun make-frame-on-display (display &optional props) "Create a frame on the X display named DISPLAY. @@ -332,15 +312,4 @@ (if (equal display "") (setq display nil)) (make-frame-on-device 'x display props)) -;; Character 160 (octal 0240) displays incorrectly under X apparently -;; due to a universally crocked font width specification. Display it -;; as a space since that's what seems to be expected. -;; -;; (make-vector 256 nil) instead of (make-display-table) because -;; make-display-table doesn't exist when this file is loaded. - -(let ((tab (make-vector 256 nil))) - (aset tab 160 " ") - (set-specifier current-display-table tab 'global 'x)) - ;;; x-init.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-iso8859-1.el --- a/lisp/x-iso8859-1.el Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -;;; x-iso8859-1 --- Mapping between X keysym names and ISO 8859-1 - -;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc. - -;; Author: Jamie Zawinski -;; Created: 15-jun-92 -;; Maintainer: XEmacs Development Team -;; Keywords: extensions, internal, dumped - -;; This file is part of XEmacs. - -;; XEmacs is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Synched up with: Not synched. - -;;; Commentary: - -;; created by jwz, 13-jun-92. -;; changed by Heiko Muenkel, 12-jun-1997: Added a grave keysym. - -;; Under X, when the user types a character that is ISO-8859/1 but not ASCII, -;; it comes in as a symbol instead of as a character code. This keeps things -;; nice and character-set independent. This file takes all of those symbols -;; (the symbols that are the X names for the 8859/1 characters) and puts a -;; property on them which holds the character code that should be inserted in -;; the buffer when they are typed. The self-insert-command function will look -;; at this. It also binds them all to self-insert-command. - -;; It puts the same property on the keypad keys, so that (read-char) will -;; think that they are the same as the digit characters. However, those -;; keys are bound to one-character keyboard macros, so that `kp-9' will, by -;; default, do the same thing that `9' does, in whatever the current mode is. - -;; The standard case and syntax tables are set in iso8859-1.el, since -;; that is not X-specific. - -;;; Code: - -(require 'iso8859-1) - -(defconst iso8859/1-code-to-x-keysym-table nil - "Maps iso8859/1 to an X keysym name which corresponds to it. -There may be more than one X name for this keycode; this returns the first one. -Note that this is X specific; one should avoid using this table whenever -possible, in the interest of portability.") - -;; (This esoteric little construct is how you do MACROLET in elisp. It -;; generates the most efficient code for the .elc file by unwinding the -;; loop at compile-time.) - -((macro - . (lambda (&rest syms-and-iso8859/1-codes) - (cons - 'progn - (nconc - ;; - ;; First emit code that puts the `x-iso8859/1' property on all of - ;; the keysym symbols. - ;; - (mapcar '(lambda (sym-and-code) - (list 'put (list 'quote (car sym-and-code)) - ''x-iso8859/1 (car (cdr sym-and-code)))) - syms-and-iso8859/1-codes) - ;; - ;; Then emit code that binds all of those keysym symbols to - ;; `self-insert-command'. - ;; - (mapcar '(lambda (sym-and-code) - (list 'global-set-key (list 'quote (car sym-and-code)) - ''self-insert-command)) - syms-and-iso8859/1-codes) - ;; - ;; Then emit the value of iso8859/1-code-to-x-keysym-table. - ;; - (let ((v (make-vector 256 nil))) - ;; the printing ASCII chars have 1-char names. - (let ((i 33)) - (while (< i 127) - (aset v i (intern (make-string 1 i))) - (setq i (1+ i)))) - ;; these are from the keyboard character set. - (mapcar '(lambda (x) (aset v (car x) (car (cdr x)))) - '((8 backspace) (9 tab) (10 linefeed) (13 return) - (27 escape) (32 space) (127 delete))) - (mapcar '(lambda (sym-and-code) - (or (aref v (car (cdr sym-and-code))) - (aset v (car (cdr sym-and-code)) (car sym-and-code)))) - syms-and-iso8859/1-codes) - (list (list 'setq 'iso8859/1-code-to-x-keysym-table v))) - )))) - - ;; The names and capitalization here are as per the MIT X11R4 and X11R5 - ;; distributions. If a vendor varies from this, adjustments will need - ;; to be made... - - (grave ?\140) - (nobreakspace ?\240) - (exclamdown ?\241) - (cent ?\242) - (sterling ?\243) - (currency ?\244) - (yen ?\245) - (brokenbar ?\246) - (section ?\247) - (diaeresis ?\250) - (copyright ?\251) - (ordfeminine ?\252) - (guillemotleft ?\253) - (notsign ?\254) - (hyphen ?\255) - (registered ?\256) - (macron ?\257) - (degree ?\260) - (plusminus ?\261) - (twosuperior ?\262) - (threesuperior ?\263) - (acute ?\264) ; Why is there an acute keysym that is - (mu ?\265) ; distinct from apostrophe/quote, but - (paragraph ?\266) ; no grave keysym that is distinct from - (periodcentered ?\267) ; backquote? - (cedilla ?\270) ; I've added the grave keysym, because it's - (onesuperior ?\271) ; used in x-compose (Heiko Muenkel). - (masculine ?\272) - (guillemotright ?\273) - (onequarter ?\274) - (onehalf ?\275) - (threequarters ?\276) - (questiondown ?\277) - - (Agrave ?\300) - (Aacute ?\301) - (Acircumflex ?\302) - (Atilde ?\303) - (Adiaeresis ?\304) - (Aring ?\305) - (AE ?\306) - (Ccedilla ?\307) - (Egrave ?\310) - (Eacute ?\311) - (Ecircumflex ?\312) - (Ediaeresis ?\313) - (Igrave ?\314) - (Iacute ?\315) - (Icircumflex ?\316) - (Idiaeresis ?\317) - (ETH ?\320) - (Ntilde ?\321) - (Ograve ?\322) - (Oacute ?\323) - (Ocircumflex ?\324) - (Otilde ?\325) - (Odiaeresis ?\326) - (multiply ?\327) - (Ooblique ?\330) - (Ugrave ?\331) - (Uacute ?\332) - (Ucircumflex ?\333) - (Udiaeresis ?\334) - (Yacute ?\335) - (THORN ?\336) - (ssharp ?\337) - - (agrave ?\340) - (aacute ?\341) - (acircumflex ?\342) - (atilde ?\343) - (adiaeresis ?\344) - (aring ?\345) - (ae ?\346) - (ccedilla ?\347) - (egrave ?\350) - (eacute ?\351) - (ecircumflex ?\352) - (ediaeresis ?\353) - (igrave ?\354) - (iacute ?\355) - (icircumflex ?\356) - (idiaeresis ?\357) - (eth ?\360) - (ntilde ?\361) - (ograve ?\362) - (oacute ?\363) - (ocircumflex ?\364) - (otilde ?\365) - (odiaeresis ?\366) - (division ?\367) - (oslash ?\370) - (ugrave ?\371) - (uacute ?\372) - (ucircumflex ?\373) - (udiaeresis ?\374) - (yacute ?\375) - (thorn ?\376) - (ydiaeresis ?\377) - - ) - -((macro . (lambda (&rest syms-and-iso8859/1-codes) - (cons 'progn - (mapcar '(lambda (sym-and-code) - (list 'put (list 'quote (car sym-and-code)) - ''x-iso8859/1 (car (cdr sym-and-code)))) - syms-and-iso8859/1-codes)))) - ;; - ;; Let's do the appropriate thing for some vendor-specific keysyms too... - ;; Apparently nobody agrees on what the names of these keysyms are. - ;; - (SunFA_Acute ?\264) - (SunXK_FA_Acute ?\264) - (Dacute_accent ?\264) - (DXK_acute_accent ?\264) - (hpmute_acute ?\264) - (hpXK_mute_acute ?\264) - (XK_mute_acute ?\264) - - (SunFA_Grave ?`) - (Dead_Grave ?`) - (SunXK_FA_Grave ?`) - (Dgrave_accent ?`) - (DXK_grave_accent ?`) - (hpmute_grave ?`) - (hpXK_mute_grave ?`) - (XK_mute_grave ?`) - - (SunFA_Cedilla ?\270) - (SunXK_FA_Cedilla ?\270) - (Dcedilla_accent ?\270) - (DXK_cedilla_accent ?\270) - - (SunFA_Diaeresis ?\250) - (SunXK_FA_Diaeresis ?\250) - (hpmute_diaeresis ?\250) - (hpXK_mute_diaeresis ?\250) - (XK_mute_diaeresis ?\250) - - (SunFA_Circum ?^) - (Dead_Circum ?^) - (SunXK_FA_Circum ?^) - (Dcircumflex_accent ?^) - (DXK_circumflex_accent ?^) - (hpmute_asciicircum ?^) - (hpXK_mute_asciicircum ?^) - (XK_mute_asciicircum ?^) - - (SunFA_Tilde ?~) - (Dead_Tilde ?~) - (SunXK_FA_Tilde ?~) - (Dtilde ?~) - (DXK_tilde ?~) - (hpmute_asciitilde ?~) - (hpXK_mute_asciitilde ?~) - (XK_mute_asciitilde ?~) - - (Dring_accent ?\260) - (DXK_ring_accent ?\260) - ) - -(provide 'x-iso8859-1) - -;;; x-iso8859-1.el ends here diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-win-sun.el --- a/lisp/x-win-sun.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-win-sun.el Sat Oct 25 21:40:46 2008 +0900 @@ -68,7 +68,7 @@ '(x-keysym-on-keyboard-sans-modifiers-p)) ;;;###autoload -(defun x-win-init-sun () +(defun x-win-init-sun (device) ;; help is ok ;; num_lock is ok @@ -112,51 +112,55 @@ ;; Map f33 and r13 to end or kp-end ,@(cond - ((not (x-keysym-on-keyboard-sans-modifiers-p 'end)) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'end device)) '((f33 end) (r13 end))) - ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-end)) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-end device)) '((f33 kp-end) (r13 kp-end)))) - ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f36) + ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f36 device) '((f36 stop) (f37 again))) ;; Type 4 keyboards have a real kp-subtract and a f24 labelled `=' ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-' - ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f24) - `((f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p 'kp-subtract) + ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f24 device) + `((f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p 'kp-subtract device) 'kp-equal 'kp-subtract)))) ;; Map f27 to home or kp-home, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'home)) + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'home device)) '((f27 home))) - ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-home)) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-home device)) '((f27 kp-home)))) ;; Map f29 to prior or kp-prior, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'prior)) + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'prior device)) '((f29 prior))) - ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-prior)) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-prior device)) '((f29 kp-prior)))) ;; Map f35 to next or kp-next, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'next)) + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'next device)) '((f35 next))) - ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-next)) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-next device)) '((f35 kp-next)))) - ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p 'apRead) ; SunOS 4.1.1 + ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p 'apRead device) ; SunOS 4.1.1 '((apRead f11) (apEdit f12))) - ((x-keysym-on-keyboard-sans-modifiers-p 'SunF36) ; SunOS 5 + ((x-keysym-on-keyboard-sans-modifiers-p 'SunF36 device) ; SunOS 5 '((SunF36 f11) (SunF37 f12) (f11 stop) (f12 again)))) ) - do (when (x-keysym-on-keyboard-sans-modifiers-p from-key) + ;; Get the correct value for function-key-map + with function-key-map = (symbol-value-in-console 'function-key-map + (device-console device) + function-key-map) + do (when (x-keysym-on-keyboard-sans-modifiers-p from-key device) (dolist (prefix '(() (shift) (control) (meta) (alt) (shift control) (shift alt) (shift meta) (control alt) (control meta) (alt meta) diff -r 71bf2c5667ba -r 66411359ce4e lisp/x-win-xfree86.el --- a/lisp/x-win-xfree86.el Sat Oct 25 20:35:36 2008 +0900 +++ b/lisp/x-win-xfree86.el Sat Oct 25 21:40:46 2008 +0900 @@ -45,7 +45,7 @@ '(x-keysym-on-keyboard-p x-keysym-on-keyboard-sans-modifiers-p)) ;;;###autoload -(defun x-win-init-xfree86 () +(defun x-win-init-xfree86 (device) ;; We know this keyboard is an XFree86 keyboard. As such, we can predict ;; what key scan codes will correspond to the keys on US keyboard layout, @@ -90,9 +90,14 @@ (f22 f10) (f23 f11) (f24 f12)) + ;; Get the correct value for function-key-map + with function-key-map = (symbol-value-in-console 'function-key-map + (device-console device) + function-key-map) + do - (when (and (x-keysym-on-keyboard-p key) - (not (x-keysym-on-keyboard-sans-modifiers-p key))) + (when (and (x-keysym-on-keyboard-p key device) + (not (x-keysym-on-keyboard-sans-modifiers-p key device))) ;; define also the control, meta, and meta-control versions. (loop for mods in '(() (control) (meta) (meta control)) do (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) diff -r 71bf2c5667ba -r 66411359ce4e lwlib/ChangeLog --- a/lwlib/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/lwlib/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,8 @@ +2007-09-15 Jerry James + + * xlwmenu.c (XlwMenuDestroy): Release XftFont resources + * xlwtabs.c (TabsDestroy): Ditto + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e lwlib/xlwmenu.c --- a/lwlib/xlwmenu.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lwlib/xlwmenu.c Sat Oct 25 21:40:46 2008 +0900 @@ -3351,6 +3351,10 @@ XFreePixmap (XtDisplay (mw), mw->menu.gray_pixmap); mw->menu.gray_pixmap = (Pixmap) -1; +#ifdef USE_XFT_MENUBARS + XftFontClose (XtDisplay (mw), mw->menu.renderFont); +#endif + /* Don't free mw->menu.contents because that comes from our creator. The `*_stack' elements are just pointers into `contents' so leave that alone too. But free the stacks themselves. */ diff -r 71bf2c5667ba -r 66411359ce4e lwlib/xlwtabs.c --- a/lwlib/xlwtabs.c Sat Oct 25 20:35:36 2008 +0900 +++ b/lwlib/xlwtabs.c Sat Oct 25 21:40:46 2008 +0900 @@ -572,7 +572,11 @@ static void TabsDestroy(Widget w) { - TabsFreeGCs((TabsWidget)w) ; + TabsWidget tw = (TabsWidget) w; +#ifdef USE_XFT_TABS + XftFontClose (XtDisplay (w), tw->tabs.renderFont); +#endif /* ! USE_XFT_TABS */ + TabsFreeGCs (tw) ; } diff -r 71bf2c5667ba -r 66411359ce4e man/ChangeLog --- a/man/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/man/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,142 @@ +2008-10-04 Stephen J. Turnbull + + * xemacs-faq.texi (Q5.0.7): Fix broken instructions on use of + antialiased fonts. + +2008-08-31 Aidan Kehoe + + * xemacs-faq.texi (Q5.0.7): Add a section on how one can use + antialiased fonts under X11; thank you Giacomo Boffi. + (Q1.0.3): Clarify pronunciation using a serious phonetic + alphabet. + +2008-07-26 Ville Skyttä + + * xemacs/custom.texi, xemacs/frame.texi, xemacs/mule.texi, + xemacs/packages.texi, xemacs/programs.texi, xemacs/trouble.texi: + Spelling fixes. + +2008-07-26 Aidan Kehoe + + * lispref/objects.texi (Character Type): + Document the error provoked when the reader sees an over-long + hexadecimal constant. + +2008-07-26 Aidan Kehoe + + * lispref/variables.texi (Extent): + Correct a misspelling of macros, add a needed space. Thank you + John Paul Wallington, thank you Stephen Turnbull. + +2008-05-29 Aidan Kehoe + + * lispref/objects.texi (Equality Predicates): + Expand on bignum equality; correct an omitted word in the last + commit. + +2008-05-27 Aidan Kehoe + + * lispref/objects.texi (Equality Predicates): + Cross reference to the section on comparison of numbers when + talking about using #'eq with integers; also mention that + #'eq gives t when passed identical integers, and that #'char= is + also available there. + +2008-05-21 Aidan Kehoe + + * internals/internals.texi (Ben's README): + Add a couple of @itemize / @end itemize pairs, to prevent + #'batch-texinfo-format choking on the input. + +2008-01-20 Aidan Kehoe + + * xemacs/cmdargs.texi (Command Switches): + Describe --script, -script. + +2008-02-27 Stephen J. Turnbull + + * internals/internals.texi (Discussion -- KKCC): + (Discussion -- Incremental Collector): + New nodes. + (Top): + (Discussion -- Garbage Collection): + (Discussion -- Pure Space): + Adjust pointers and menus for new nodes. + + (lrecords): Remark that lcrecords are obsolete. + +2007-12-17 Aidan Kehoe + + * lispref/strings.texi (Formatting Strings): + Document %b for binary output. + +2007-12-10 Ville Skyttä + + * internals/internals.texi: Spelling fixes. + +2007-12-07 Ville Skyttä + + * beta.texi, emodules.texi, term.texi, termcap.texi, texinfo.texi, + widget.texi, xemacs-faq.texi: Spelling fixes. + +2007-11-28 Aidan Kehoe + + * internals/internals.texi (Ibytes and Ichars): + Cross reference to the Mule docs describing these typedefs, + instead of saying Not yet documented. + +2007-11-14 Aidan Kehoe + + * lispref/objects.texi (String Type): + Describe how one can include a trailing backslash in a raw string, + by means of the Unicode escape syntax. + +2007-11-14 Aidan Kehoe + + * xemacs/keystrokes.texi (Character Representation): + Clarify the description of which characters are displayed as + themselves and which as octal escapes bzw. "control" characters + with an initial caret. + +2007-10-15 Adrian Aichner + + * Makefile (info_files): Sync nt/xemacs.mak and man/Makefile. + Sort enries to easy future syncs. + +2007-09-22 Stephen J. Turnbull + + * lispref/searching.texi (Replacing Match): Document the escapes + for changing case in `replace-match'. Document the change to + STRBUFFER to permit subexpressions in string replacement. + +2007-09-30 Adrian Aichner + + * Makefile (TEXI2HTML_NOSPLIT): New. + * Makefile ($(HTMLDIR)/beta.html): Use TEXI2HTML_NOSPLIT. + * Makefile ($(HTMLDIR)/xemacs-faq.html): Ditto. + +2007-09-30 Adrian Aichner + + * Makefile (TEXI2HTML): Refactor TEXI2HTML for use by + xemacsweb/Documentation/Makefile. + +2007-08-25 Adrian Aichner + + * internals/internals.texi (Through Version 18): Fix error in + Emacs Timeline URL. + * internals/internals.texi (Better Rendering Support -- Configuration with the Interim Patches): + +2007-06-27 Aidan Kehoe + + * lispref/variables.texi (Extent): + Mention that lexical scope is available using lexical-let and + lexical-let* in cl-macs, instead of ignoring them entirely. + +2007-05-21 Ville Skyttä + + * internals/internals.texi: Fix corrupted/oddly encoded chars. + * lispref/ldap.texi: Ditto. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e man/Makefile --- a/man/Makefile Sat Oct 25 20:35:36 2008 +0900 +++ b/man/Makefile Sat Oct 25 21:40:46 2008 +0900 @@ -23,8 +23,9 @@ SHELL = /bin/sh MAKEINFO = makeinfo TEXI2DVI = texi2dvi -TEXI2HTML = texi2html -verbose -subdir $(HTMLDIR) -TEXI2HTML_SPLIT = $(TEXI2HTML) -split chapter +TEXI2HTML = texi2html +TEXI2HTML_NOSPLIT = $(TEXI2HTML) -verbose -subdir $(HTMLDIR) +TEXI2HTML_SPLIT = $(TEXI2HTML) -verbose -subdir $(HTMLDIR) -split chapter RM = rm -f CP = cp @@ -49,16 +50,16 @@ $(INFODIR)/emodules.info \ $(INFODIR)/external-widget.info \ $(INFODIR)/info.info \ + $(INFODIR)/internals.info \ $(INFODIR)/lispref.info \ - $(INFODIR)/internals.info \ $(INFODIR)/new-users-guide.info \ $(INFODIR)/standards.info \ $(INFODIR)/term.info \ $(INFODIR)/termcap.info \ $(INFODIR)/texinfo.info \ $(INFODIR)/widget.info \ - $(INFODIR)/xemacs.info \ - $(INFODIR)/xemacs-faq.info + $(INFODIR)/xemacs-faq.info \ + $(INFODIR)/xemacs.info html_files = \ $(HTMLDIR)/beta.html \ @@ -354,7 +355,7 @@ ############################################################################ $(HTMLDIR)/beta.html : beta.texi - $(TEXI2HTML) beta.texi + $(TEXI2HTML_NOSPLIT) beta.texi $(HTMLDIR)/cl.html : cl.texi $(TEXI2HTML_SPLIT) cl.texi @@ -387,7 +388,7 @@ $(TEXI2HTML_SPLIT) widget.texi $(HTMLDIR)/xemacs-faq.html : xemacs-faq.texi - $(TEXI2HTML) xemacs-faq.texi + $(TEXI2HTML_NOSPLIT) xemacs-faq.texi $(TEXI2HTML_SPLIT) -top_file xemacs-faq_1.html xemacs-faq.texi $(CP) $(PHOTODIR)/ben.png $(HTMLDIR) $(CP) $(PHOTODIR)/cthomp.png $(HTMLDIR) diff -r 71bf2c5667ba -r 66411359ce4e man/beta.texi --- a/man/beta.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/beta.texi Sat Oct 25 21:40:46 2008 +0900 @@ -350,7 +350,7 @@ @item Run @code{configure}. If you are new, just consider running it with no -options, to see if you can get a succesful build. When you are more +options, to see if you can get a successful build. When you are more experienced, you should put various flags in. Here is what we suggest: @enumerate @@ -424,7 +424,7 @@ @end example @item -Depending on your build environment, consuder setting or not setting +Depending on your build environment, consider setting or not setting options for menubars, scrollbars, window systems, native sound, etc. If you're not sure, leave them out and let configure do the auto-detection. (If you get bugs compiling GTK, use @code{--with-gtk=no --with-gnome=no}.) diff -r 71bf2c5667ba -r 66411359ce4e man/emodules.texi --- a/man/emodules.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/emodules.texi Sat Oct 25 21:40:46 2008 +0900 @@ -990,7 +990,7 @@ function @code{my-function}, if it was defined as an interactive function (which in this case it was). -Thats all there is to defining and announcing new functions. The rules +That's all there is to defining and announcing new functions. The rules for what goes inside the functions, and how to write good modules, is beyond the scope of this document. Please consult the @value{emacs} internals manual for more details. diff -r 71bf2c5667ba -r 66411359ce4e man/internals/internals.texi --- a/man/internals/internals.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/internals/internals.texi Sat Oct 25 21:40:46 2008 +0900 @@ -740,6 +740,8 @@ Discussion -- Garbage Collection +* Discussion -- KKCC:: +* Discussion -- Incremental Collector:: * Discussion -- Pure Space:: * Discussion -- Hashtable-Based Marking and Cleanup:: * Discussion -- The Anti-Cons:: @@ -947,21 +949,21 @@ @item Scrollbars: Chuck Thompson, ??? (Lucid scrollbar) @item -Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by chuck thompson +Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by Chuck Thompson @item Faces: first implementation, Jamie Zawinski; second, chuck; third, Ben Wing @item Fonts/colors: first implementation, Jamie Zawinski; further work, Ben Wing @item -Toolbars: implementation, chuck, much interface work, Ben Wing -@item -Gutters, tabs: andy piper +Toolbars: implementation, Chuck, much interface work, Ben Wing +@item +Gutters, tabs: Andy Piper @end itemize @item Device subsystems @itemize @minus @item -X Windows: Jamie Zawinksi, Ben Wing, others +X Windows: Jamie Zawinski, Ben Wing, others @item GTK: William Perry, Malcolm Purvis @item @@ -975,7 +977,7 @@ @item Misc @itemize @minus @item -Configure: initial porting from fsf, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz +Configure: initial porting from FSF, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz @item Most initialization-related code: Ben Wing @item @@ -1023,7 +1025,7 @@ and has attempted to be the "face" of XEmacs on the newsgroups and mailing lists. @item -Steve Youngs, Ville Skytta, and now Norbert Koch have taken turns +Steve Youngs, Ville Skytt䬠and now Norbert Koch have taken turns maintaining the packages. @item Vin Shelton maintains the stable releases. @@ -1037,7 +1039,7 @@ @table @asis @item Jamie Zawinski, Eric Benson, Matthieu Devin, Harlan Sexton -These were the early creators of Lucid Emacs, the predecessor of Xemacs. +These were the early creators of Lucid Emacs, the predecessor of XEmacs. Jamie Zawinski was the primary maintainer and coder for Lucid Emacs, active between early 1991 and June 1994. He presided over versions 19.0 through 19.10, and then abruptly left for Netscape. He wrote the @@ -1054,44 +1056,44 @@ Active 1991 to 1993, author of much of the current Lisp object scheme, including Lrecords and LC records (added this support in 1993 to allow for 28-bit pointers, which had previously been restricted to 26 bits.) -Moved the minibuffer and abbreve code into Lisp, worked on the keymap -code and did the initial synching between Xemacs and the first released +Moved the minibuffer and abbrev code into Lisp, worked on the keymap +code and did the initial synching between XEmacs and the first released version of GNU Emacs version 19 in mid-1993. @item Martin Buchholz -Active 1995 to 2001, maintainer of Xemacs late 1999 to ?, author of the +Active 1995 to 2001, maintainer of XEmacs late 1999 to ?, author of the current configure support, mini optimizations to the byte interpreter, many improvements to the case changing code and many bug fixes to the process and system-specific code, also general spell checking and code cleanliness guru. @item Steve Baur -Maintainer of Xemacs 1996 to 1999, responsible for many improvements to -the Xemacs development process, for example, creation of the review -board and arranging for Xemacs to be placed under CVS. Author of the +Maintainer of XEmacs 1996 to 1999, responsible for many improvements to +the XEmacs development process, for example, creation of the review +board and arranging for XEmacs to be placed under CVS. Author of the package code. @item Chuck Thompson Active January 1993 to June 1996, author of the current and previous -versions of the redisplay code and maintainer of Xemacs from mid-1994 -to mid-1996. Creator of XEMacs.org. Also wrote the scrollbar code, the +versions of the redisplay code and maintainer of XEmacs from mid-1994 +to mid-1996. Creator of xemacs.org. Also wrote the scrollbar code, the original configure support, and prototype versions of the toolbar and device code. @item Ben Wing Active April 1993 to April 1996 and February 2000 to present. Chief -coder for Xemacs between 1994 and 1996. Ben Wing was never the -maintainer of Xemacs, and as a result, is the author of more of the -Xemacs specific code in Xemacs than anyone else. Author of the mule +coder for XEmacs between 1994 and 1996. Ben Wing was never the +maintainer of XEmacs, and as a result, is the author of more of the +XEmacs specific code in XEmacs than anyone else. Author of the mule support (Extense code), the glis-phonetically spelled-and specifiers code most of the toolbars, and device distraction code, the error checking code, the Lstream code, the bit vector, char-table, and range-table code, much of the current Xt code, much, much of the events code (including most of the TTY event code), some of the phase code, and -numerous other aspects of the code. Also author of most of the Xemacs -documentation including the internals manual and the Xemacs editions to +numerous other aspects of the code. Also author of most of the XEmacs +documentation including the internals manual and the XEmacs editions to the Lisp reference manual, and responsible for much of the synching -between Xemacs and GNU Emacs. +between XEmacs and GNU Emacs. @item Kyle Jones Author of the minimal tag bits support, which allows for 32-bit @@ -1160,13 +1162,13 @@ @item alloca.c Inherited a long time ago from a prerelease version of GNU Emacs 19, -kept in sync with more recent versions very few changes from Xemacs. +kept in sync with more recent versions very few changes from XEmacs. Most changes consist of converting the code to ANSI C, and fixing up the -includes at the top of the file to follow Xemacs conventions. +includes at the top of the file to follow XEmacs conventions. @item alloca.s Inherited almost unchanged from FSF kept in sync up through 19.30 -basically no changes for Xemacs. +basically no changes for XEmacs. @end table @end ignore @@ -1240,7 +1242,7 @@ collaboration, referring to it as "Gosling Emacs". At this point we pick up with a time line of events. (A broader timeline -is available at @uref{http://http://www.jwz.org/doc/emacs-timeline.html, +is available at @uref{http://www.jwz.org/doc/emacs-timeline.html, ``Emacs Timeline''}.) @strong{NOTE}: Sometimes there are two release dates listed below. In @@ -1275,13 +1277,13 @@ transmitted/read by emacs (one or the other) correctly. The 4410 terminal description that I'm using defines up=M-[A (it appears as ^[[A, with the initial ^[ as one character). -Pressting cntrl-Q up_arrow while in emacs shows me the same thing. +Pressing Ctrl-Q up_arrow while in emacs shows me the same thing. On the vt100 the same thing happens but the terminal file says up=M-A (it appears as ^[A). I've tried every other imaginable up= but get the same results. I've also been unsuccessful writing a macro that understands what my keyboard is saying. -Any ideas on how I can get the arrow keys to do somethingt? +Any ideas on how I can get the arrow keys to do something? Anything? Thanks in advance. --Bruce Burger AT&T-Information Systems Freehold, NJ @@ -1751,7 +1753,7 @@ these same years. Steve Baur added the package system in 1997 (?), and Olivier Galibert also added the portable dumper support around 2000. Martin Buchholz took over from Steve Baur as release manager in -late 1998 (?), and continued in this position through to eary 2000 +late 1998 (?), and continued in this position through to early 2000 (?), when Stephen Turnbull took it over. XEmacs has also been split into stable and experimental branches since early 1999, and Vin Shelton has been the release manager of the stable branches since the @@ -2178,8 +2180,8 @@ rather than technical. The XEmacs maintainers would like to have issues resolved by examining them technically and deciding what makes the most sense from a technical prospective. RMS however, wants to proceed on a -tit for tat kind of basis, which is to say, “If we support this feature -of yours, we also get to support this other feature of mine.” The +tit for tat kind of basis, which is to say, ``If we support this feature +of yours, we also get to support this other feature of mine.'' The result of such a process is typically a big mess, because there is no overarching design but instead a great deal of incompatible things hodgepodged together. @@ -4630,7 +4632,7 @@ Autoconf 2.59 divides the @file{configure} options into those that specify features (@samp{--enable}) and those that specify external libraries (@samp{--with}). Many XEmacs options to not fall neatly into -either of these catagories and so as a matter of policy all options can +either of these categories and so as a matter of policy all options can be specified by either method. These merged options are declared with the @code{XE_MERGED_ARG} macro. @@ -4660,7 +4662,7 @@ @samp{--with-mail-locking=flock}. Keyword options are defined with an expanded form of -@samp{XE_MERGED_ARG} called @samp{XE_KEYWORD_ARG}, which taks 5 +@samp{XE_MERGED_ARG} called @samp{XE_KEYWORD_ARG}, which takes 5 parameters. The first 4 parameters are the same as original macro with the exception that all of these four parameters are @strong{required}. The @var{action-if-true} code is run after the argument list has been @@ -5954,7 +5956,7 @@ a search-and-replace is done to change type names and such. Some people disagree with such changes, and certainly if done without good reason will just lead to headaches. But it's important to keep the code clean -and understable, and consistent naming goes a long way towards this. +and understandable, and consistent naming goes a long way towards this. An example of the right way to do this was the so-called "great integral type renaming". @@ -8551,6 +8553,9 @@ [see @file{lrecord.h}] +@strong{This node needs updating for the ``new garbage collection +algorithms'' (KKCC) and the ``incremental'' collector.} + 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. All builtin type numbers are defined as @@ -8571,6 +8576,9 @@ only for debugging and could be removed, but the space gain is not significant.) +@strong{lcrecords are now obsolete when using the write-barrier-based +collector.} + Simple lrecords are created using @code{ALLOCATE_FIXED_TYPE()}, just like for other frob blocks. The only change is that the implementation pointer must be initialized correctly. (The implementation structure for @@ -9985,9 +9993,10 @@ @node Ibytes and Ichars, Byte-Char Position Conversion, The Text in a Buffer, Text @section Ibytes and Ichars @cindex Ibytes and Ichars -@cindex Ichars, Ibytes and - - Not yet documented. +@cindex Ichars, Ibytes + +This is documented under the internationalization support: +@pxref{Byte/Character Types; Buffer Positions; Other Typedefs} @node Byte-Char Position Conversion, Searching and Matching, Ibytes and Ichars, Text @section Byte-Char Position Conversion @@ -11327,7 +11336,7 @@ the actual multi-byte encoding. @end enumerate - None of the pre-Unciode standard non-modal encodings meet all of these + None of the pre-Unicode standard non-modal encodings meet all of these conditions. For example, EUC satisfies only (2) and (3), while Shift-JIS and Big5 (not yet described) satisfy only (2). (All non-modal encodings must satisfy (2), in order to be unambiguous.) UTF-8, @@ -11514,7 +11523,7 @@ inside of DNS names. @end itemize -Thus, we can imagine three levels in the representation of texual data: +Thus, we can imagine three levels in the representation of textual data: @example series of characters -> series of textual units -> series of bytes @@ -12094,7 +12103,7 @@ variable section: DECLARE_EISTRING (name); - Declare a new Eistring and initialize it to the empy string. This + Declare a new Eistring and initialize it to the empty string. This is a standard local variable declaration and can go anywhere in the variable declaration section. NAME itself is declared as an Eistring *, and its storage declared on the stack. @@ -13441,7 +13450,7 @@ dependent on the current locale setting, which includes the locale code page. (For more information, see Locale-Dependent Routines.) By default, all locale-dependent routines in the Microsoft run-time -library use the code page that corresponds to the ¡ë?locale. At +library use the code page that corresponds to the locale. At run-time you can change or query the locale code page in use with a call to setlocale. @@ -13453,7 +13462,7 @@ -- The "C" locale is defined by ANSI to correspond to the locale in which C programs have traditionally executed. The code page for the -"C" locale (¡ë?code page) corresponds to the ASCII character +"C" locale (code page) corresponds to the ASCII character set. For example, in the "C" locale, islower returns true for the values 0x61 ?0x7A only. In another locale, islower may return true for these as well as other values, as defined by that locale. @@ -16758,6 +16767,7 @@ systems: @enumerate + @itemize @item they would be character->character and operate next to the internal data; this means that coding systems need to be able @@ -16794,6 +16804,7 @@ important: we need a way of specifying how detecting works when we have more than one coding system. we might need more than a single priority list. need to think about this. + @end itemize @end enumerate @item @@ -16812,6 +16823,7 @@ text when it's written out. We need two levels @enumerate + @itemize @item first, a "safe-charset" level that checks before any actual encoding to see if all characters in the document can safely @@ -16843,6 +16855,7 @@ @item same thing (error checking, list of alternatives, etc.) needs to happen when reading! all of this will be a lot of work! + @end itemize @end enumerate @end itemize @end itemize @@ -27913,7 +27926,7 @@ @end example Order is important; Japanese fonts will support English, but Sazanami's Roman characters are not very pretty compared to the Bitstream font. -@strong{Note:} @emph{This is untested, but should work in theory.} +@strong{NOTE}: @emph{This is untested, but should work in theory.} @end itemize @@ -28418,12 +28431,82 @@ @cindex garbage collection, discussion @menu +* Discussion -- KKCC:: +* Discussion -- Incremental Collector:: * Discussion -- Pure Space:: * Discussion -- Hashtable-Based Marking and Cleanup:: * Discussion -- The Anti-Cons:: @end menu -@node Discussion -- Pure Space, Discussion -- Hashtable-Based Marking and Cleanup, Discussion -- Garbage Collection, Discussion -- Garbage Collection +@node Discussion -- KKCC, Discussion -- Incremental Collector, Discussion -- Garbage Collection, Discussion -- Garbage Collection +@subsection Discussion -- KKCC +@cindex discussion, KKCC +@cindex KKCC, discussion + +KKCC is the tag used for the ``new garbage collector algorithms,'' which +are a refactoring of the garbage collector to make trying new collectors +simpler. + +@node Discussion -- Incremental Collector, Discussion -- Pure Space, Discussion -- KKCC, Discussion -- Garbage Collection +@subsection Discussion -- Incremental Collector +@cindex discussion, Incremental Collector +@cindex Incremental Collector, discussion + +The incremental collector is designed to allow better ``realtime'' +performance by not requiring a full mark and sweep pass. This also +allows removal of most finalizers, as described in +@samp{} by Marcus Crestani +on xemacs-beta: + +I was able to nuke many finalizers by transforming +separately allocated data structures to Lisp objects. Some of the +remaining finalizers are also likely to go away, as soon as I (or +someone else) find the time to ``lift'' the remaining, separately allocated +objects to Lisp objects. + +Unfortunately, the current Lisp object layout leads to holes in the +write barrier: Not all data structures that contain pointers to Lisp +objects are allocated on the Lisp heap. Some Lisp objects do not carry +all their information in the object itself. External parts are kept in +separately allocated memory blocks that are not managed by the new Lisp +allocator. Examples for these objects are hash tables and dynamic +arrays, two objects that can dynamically grow and shrink. The separate +memory blocks are not guaranteed to reside on page boundaries, and thus +cannot be watched by the write barrier. + +Moreover, the separate parts can contain live pointers to other Lisp +objects. These pointers are not covered by the write barrier and +modifications by the client during garbage collection do escape. In +this case, the client changes the connectivity of the reachability +graph behind the collector's back, which eventually leads to erroneous +collection of live objects. To solve this problem, I transformed the +separately allocated parts to fully qualified Lisp objects that are +managed by the allocator and thus are covered by the write barrier. +This also removes a lot of special allocation and removal code for the +out-sourced parts. Generally, allocating all data structures that +contain pointers to Lisp objects on one heap makes the whole memory +layout more consistent. + +A large part of the patch converts these data structures to Lisp +objects. The conversion of an additionally allocated data structure to +an Lisp objects includes: +@itemize +@item Add new object type to @samp{enum lrecord_type} in @file{lrecord.h}. +@item Add @samp{lrecord_header} to the object's struct. +@item Add @samp{DECLARE_RECORD()}/@samp{XFOO}/etc. below the struct definition. +@item Add lrecord definition. +@item Change allocation with malloc to allocation with new allocator. +@item Add object to @samp{syms_of_*()}. +@item Change memory description of parent object. +@item Modify finalizer, free, or delete functions. +@end itemize + +The initial motivation for this is the write barrier and the consistent +format for all objects that may contain Lisp pointers. That we can get +rid of finalizers this way follows naturally. + + +@node Discussion -- Pure Space, Discussion -- Hashtable-Based Marking and Cleanup, Discussion -- Incremental Collector, Discussion -- Garbage Collection @subsection Discussion -- Pure Space @cindex discussion, pure space @cindex pure space, discussion @@ -29710,7 +29793,6 @@ -- In order to save my hands, I am cutting back on my responses, especially to XEmacs-related mail. You _will_ get a response, but please be patient. - If you need an immediate response and it is not apparent in your message, please say so. Thanks for your understanding. @@ -30033,11 +30115,10 @@ ben -- -In order to save my hands, I am cutting back on my responses, especially to -XEmacs-related mail. You -_will_ get a response, but please be patient. If you need an immediate -response and it’s not apparent in -your message, please say so. Thanks for your understanding. +In order to save my hands, I am cutting back on my responses, especially +to XEmacs-related mail. You _will_ get a response, but please be patient. +If you need an immediate response and it's not apparent in your message, +please say so. Thanks for your understanding. @@ -30125,11 +30206,10 @@ ben -- -In order to save my hands, I am cutting back on my responses, especially to -XEmacs-related mail. You -_will_ get a response, but please be patient. If you need an immediate -response and it’s not apparent in -your message, please say so. Thanks for your understanding. +In order to save my hands, I am cutting back on my responses, especially +to XEmacs-related mail. You _will_ get a response, but please be patient. +If you need an immediate response and it's not apparent in your message, +please say so. Thanks for your understanding. @@ -31577,10 +31657,8 @@ -- In order to save my hands, I am cutting back on my responses, especially -to XEmacs-related mail. You _will_ get a response, but please be -patient. +to XEmacs-related mail. You _will_ get a response, but please be patient. If you need an immediate response and it is not apparent in your message, - please say so. Thanks for your understanding. @end example diff -r 71bf2c5667ba -r 66411359ce4e man/lispref/ldap.texi --- a/man/lispref/ldap.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/lispref/ldap.texi Sat Oct 25 21:40:46 2008 +0900 @@ -105,7 +105,7 @@ library XEmacs was compiled with, they may include @code{simple}, @code{krbv41} and @code{krbv42}. @item base -The base for the search. This may look like @samp{cÿ, o¬me}, see +The base for the search. This may look like @samp{o=ACME, c=US}, see RFC 1779 for syntax details. @item scope One of the symbols @code{base}, @code{onelevel} or @code{subtree} diff -r 71bf2c5667ba -r 66411359ce4e man/lispref/objects.texi --- a/man/lispref/objects.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/lispref/objects.texi Sat Oct 25 21:40:46 2008 +0900 @@ -647,17 +647,16 @@ followed by a backslash and the character code in octal (up to three octal digits); thus, @samp{?\101} for the character @kbd{A}, @samp{?\001} for the character @kbd{C-a}, and @code{?\002} for the -character @kbd{C-b}. +character @kbd{C-b}. The reader will finalize the character and start +reading the next token when a non-octal-digit is encountered or three +octal digits are read. The second consists of a question mark followed by a backslash, the character @samp{x}, and the character code in hexadecimal (up to two hexadecimal digits); thus, @samp{?\x41} for the character @kbd{A}, @samp{?\x1} for the character @kbd{C-a}, and @code{?\x2} for the -character @kbd{C-b}. - -In both cases, the reader will finalize the character when a non-digit -is encountered or the maximum length of a character code is reached. It -then starts reading the next token. +character @kbd{C-b}. If more than two hexadecimal codes are given, the +reader signals an error. @example @group @@ -1084,10 +1083,13 @@ a string, each character following a backslash is included literally in the string, and all backslashes are left in the string. This means that @code{#r"\""} is a valid string literal with two characters, a backslash and a -double-quote. It also means that a string with this syntax @emph{cannot end -in a single backslash}. As with Python, from where this syntax was +double-quote. It also means that a string with this syntax cannot end +in a single backslash. As with Python, from where this syntax was taken, you can specify @code{u} or @code{U} after the @code{#r} to -specify that interpretation of Unicode escapes should be done. +specify that interpretation of Unicode escapes should be +done---@pxref{Character Type}---and if you use @code{#ru} for your raw +strings, the restriction on the trailing backslash can be worked around +like so: @code{#ru"Backslash: \u005C"}. The newline character is not special in the read syntax for strings; if you write a new line between the double-quotes, it becomes a @@ -2243,12 +2245,19 @@ change in one will be reflected by the same change in the other. @code{eq} returns @code{t} if @var{object1} and @var{object2} are -integers with the same value. Also, since symbol names are normally -unique, if the arguments are symbols with the same name, they are -@code{eq}. For other types (e.g., lists, vectors, strings), two -arguments with the same contents or elements are not necessarily -@code{eq} to each other: they are @code{eq} only if they are the same -object. +integers with the same value. It is preferable to use @code{=} or +@code{eql} in many contexts for numeric comparison, especially since +bignums (integers with values that would have otherwise overflowed, only +available on some builds) with the same value are not @code{eq}; +@pxref{Comparison of Numbers}. @code{eq} also returns @code{t} if +@var{object1} and @var{object2} are identical characters, though in this +case you may prefer to use @code{char=}. + +Also, since symbol names are normally unique, if the arguments are +symbols with the same name, they are @code{eq}. For other types (e.g., +lists, vectors, strings), two arguments with the same contents or +elements are not necessarily @code{eq} to each other: they are @code{eq} +only if they are the same object. (The @code{make-symbol} function returns an uninterned symbol that is not interned in the standard @code{obarray}. When uninterned symbols @@ -2256,11 +2265,11 @@ the same name are not @code{eq}. @xref{Creating Symbols}.) NOTE: Under XEmacs 19, characters are really just integers, and thus -characters and integers are @code{eq}. Under XEmacs 20, it was -necessary to preserve remnants of this in function such as @code{old-eq} -in order to maintain byte-code compatibility. Byte code compiled -under any Emacs 19 will automatically have calls to @code{eq} mapped -to @code{old-eq} when executed under XEmacs 20. +characters and integers with the same numeric code are @code{eq}. Under +XEmacs 20, it was necessary to preserve remnants of this in function +such as @code{old-eq} in order to maintain byte-code compatibility. +Byte code compiled under any Emacs 19 will automatically have calls to +@code{eq} mapped to @code{old-eq} when executed under XEmacs 20. @example @group diff -r 71bf2c5667ba -r 66411359ce4e man/lispref/searching.texi --- a/man/lispref/searching.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/lispref/searching.texi Sat Oct 25 21:40:46 2008 +0900 @@ -1282,19 +1282,14 @@ @var{replacement}. If you did the last search in a buffer, you should specify @code{nil} -for @var{string}. Then @code{replace-match} does the replacement by -editing the buffer; it leaves point at the end of the replacement text, -and returns @code{t}. +for @var{string}. (An error will be signaled if you don't.) Then +@code{replace-match} does the replacement by editing the buffer; it +leaves point at the end of the replacement text, and returns @code{t}. If you did the search in a string, pass the same string as @var{string}. -Then @code{replace-match} does the replacement by constructing and -returning a new string. - -If the fourth argument @var{string} is a string, fifth argument -@var{strbuffer} specifies the buffer to be used for syntax-table and -case-table lookup and defaults to the current buffer. When @var{string} -is not a string, the buffer that the match occurred in has automatically -been remembered and you do not need to specify it. +(An error will be signaled if you specify nil.) Then +@code{replace-match} does the replacement by constructing and returning +a new string. If @var{fixedcase} is non-@code{nil}, then the case of the replacement text is not changed; otherwise, the replacement text is converted to a @@ -1317,21 +1312,65 @@ @table @asis @item @samp{\&} -@cindex @samp{&} in replacement +@cindex @samp{\&} in replacement @samp{\&} stands for the entire text being replaced. @item @samp{\@var{n}} @cindex @samp{\@var{n}} in replacement +@cindex @samp{\@var{digit}} in replacement @samp{\@var{n}}, where @var{n} is a digit, stands for the text that matched the @var{n}th subexpression in the original regexp. Subexpressions are those expressions grouped inside @samp{\(@dots{}\)}. @item @samp{\\} -@cindex @samp{\} in replacement +@cindex @samp{\\} in replacement @samp{\\} stands for a single @samp{\} in the replacement text. + +@item @samp{\u} +@cindex @samp{\u} in replacement +@samp{\u} means upcase the next character. + +@item @samp{\l} +@cindex @samp{\l} in replacement +@samp{\l} means downcase the next character. + +@item @samp{\U} +@cindex @samp{\U} in replacement +@samp{\U} means begin upcasing all following characters. + +@item @samp{\L} +@cindex @samp{\L} in replacement +@samp{\L} means begin downcasing all following characters. + +@item @samp{\E} +@cindex @samp{\E} in replacement +@samp{\E} means terminate the effect of any @samp{\U} or @samp{\L}. @end table + +Case changes made with @samp{\u}, @samp{\l}, @samp{\U}, and @samp{\L} +override all other case changes that may be made in the replaced text. + +The fifth argument @var{strbuffer} may be a buffer to be used for +syntax-table and case-table lookup. If @var{strbuffer} is not a buffer, +the current buffer is used. When @var{string} is not a string, the +buffer that the match occurred in has automatically been remembered and +you do not need to specify it. @var{string} may also be an integer, +specifying the index of the subexpression to match. When @var{string} +is not an integer, the ``subexpression'' is 0, @emph{i.e.}, the whole +match. An @code{invalid-argument} error will be signaled if you specify +a buffer when @var{string} is nil, or specify a subexpression which was +not matched. + +It is not possible to specify both a buffer and a subexpression, but the +idiom +@example +(with-current-buffer @var{buffer} (replace-match ... @var{integer})) +@end example +may be used. + @end defun + @node Entire Match Data @subsection Accessing the Entire Match Data diff -r 71bf2c5667ba -r 66411359ce4e man/lispref/strings.texi --- a/man/lispref/strings.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/lispref/strings.texi Sat Oct 25 21:40:46 2008 +0900 @@ -715,6 +715,11 @@ Replace the specification with the base-sixteen representation of an integer, using uppercase letters. +@item %b +@cindex integer to binary +Replace the specification with the base-two representation of an +integer. + @item %c Replace the specification with the character which is the value given. diff -r 71bf2c5667ba -r 66411359ce4e man/lispref/variables.texi --- a/man/lispref/variables.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/lispref/variables.texi Sat Oct 25 21:40:46 2008 +0900 @@ -894,8 +894,12 @@ @cindex closures not available Some Lisp dialects have ``closures'', objects that are like functions -but record additional variable bindings. XEmacs Lisp does not have -closures. +but record additional variable bindings. Closures are available in +XEmacs Lisp using the @code{lexical-let} and @code{lexical-let*} macros, +which are autoloaded from @file{cl-macs}. @xref{(cl)Lexical Bindings}. +Note that function arguments cannot be closed around using these +macros, and that any lambda expressions returned will not be +byte-compiled. @node Impl of Scope @subsection Implementation of Dynamic Scoping diff -r 71bf2c5667ba -r 66411359ce4e man/term.texi --- a/man/term.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/term.texi Sat Oct 25 21:40:46 2008 +0900 @@ -34,7 +34,7 @@ @end menu The @code{term} package includes the major modes @code{term}, -@code{shell}, and @code{gud} (for running gbd or another debugger). +@code{shell}, and @code{gud} (for running gdb or another debugger). It is a replacement for the comint mode of Emacs 19, as well as shell, gdb, terminal, and telnet modes. The package works best with recent releases of Emacs 19, diff -r 71bf2c5667ba -r 66411359ce4e man/termcap.texi --- a/man/termcap.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/termcap.texi Sat Oct 25 21:40:46 2008 +0900 @@ -174,7 +174,7 @@ variables.@refill On Unix systems, there is often no such header file. Then you must -explictly declare the variables as external. You can do likewise for +explicitly declare the variables as external. You can do likewise for the functions, or let them be implicitly declared and cast their values from type @code{int} to the appropriate type. @@ -487,7 +487,7 @@ immediately will be lost. To avoid this problem, we normally follow each display command with enough -useless charaters (usually null characters) to fill up the time that the +useless characters (usually null characters) to fill up the time that the display command needs to execute. This does the job if the terminal throws away null characters without using up space in the buffer (which most terminals do). If enough padding is used, no output can ever be lost. The @@ -912,7 +912,7 @@ tabs or newlines. These might cause trouble: the null character because @code{tputs} would think that was the end of the string, the tab because the kernel or other software might expand it into spaces, and the newline -becaue the kernel might add a carriage-return, or padding characters +because the kernel might add a carriage-return, or padding characters normally used for a newline. To prevent such problems, @code{tgoto} is careful to avoid these characters. Here is how this works: if the target cursor position value is such as to cause a problem (that is to say, zero, @@ -3317,7 +3317,7 @@ @item po String to redirect further output to the printer. @item pO -String to redirect @var{n} characters ofoutput to the printer. +String to redirect @var{n} characters of output to the printer. @item ps String to print the screen on the attached printer. @item rc diff -r 71bf2c5667ba -r 66411359ce4e man/texinfo.texi --- a/man/texinfo.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/texinfo.texi Sat Oct 25 21:40:46 2008 +0900 @@ -141,7 +141,7 @@ @end ifinfo @c Here is a spare copy of the chapter menu entry descriptions, -@c in case they are accidently deleted +@c in case they are accidentally deleted @ignore Your rights. Texinfo in brief. @@ -11439,7 +11439,7 @@ commands, by delineating a region with the @code{@@tex} and @code{@@end tex} commands. (The @code{@@tex} command also causes Info to ignore the region, like the @code{@@iftex} command.) The sole exception is that -@code{@@} chracter still introduces a command, so that @code{@@end tex} +@code{@@} character still introduces a command, so that @code{@@end tex} can be recognized properly. @cindex Mathematical expressions @@ -11978,7 +11978,7 @@ @TeX{} will produce a @dfn{DVI file} as well as several auxiliary files containing information for indices, cross references, etc. The DVI file (for @dfn{DeVice Independent} file) can be printed on virtually -any printe (see the following sections). +any printer (see the following sections). @pindex texindex The @code{tex} formatting command itself does not sort the indices; it diff -r 71bf2c5667ba -r 66411359ce4e man/widget.texi --- a/man/widget.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/widget.texi Sat Oct 25 21:40:46 2008 +0900 @@ -1541,7 +1541,7 @@ @defun widget-create-child-and-convert parent type &rest args As a child of @var{parent}, create a widget with type @var{type} and -value @var{value}. @var{type} is copied, and the @code{:widget-contvert} +value @var{value}. @var{type} is copied, and the @code{:widget-convert} method is applied to the optional keyword arguments from @var{args}. @end defun diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs-faq.texi --- a/man/xemacs-faq.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs-faq.texi Sat Oct 25 21:40:46 2008 +0900 @@ -433,6 +433,7 @@ * Q5.0.4:: How can I have the window title area display the full path? * Q5.0.5:: @samp{xemacs -name junk} doesn't work? * Q5.0.6:: @samp{-iconic} doesn't work. +* Q5.0.7:: How can I use antialiased fonts under X11? 5.1: Microsoft Windows * Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? @@ -715,7 +716,10 @@ @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction @unnumberedsubsec Q1.0.3: How do you pronounce XEmacs? -The most common pronounciation is @samp{Eks eemax}. +The most common pronounciation is @samp{Eks eemax}, @samp{Eks'im&ks} in +Kirshenbaum IPA. (See +@uref{http://www.kirshenbaum.net/IPA/ascii-ipa.pdf} if you know the IPA +already and want to know how to map from Kirshenbaum to it.) @node Q1.0.4, Q1.0.5, Q1.0.3, Introduction @unnumberedsubsec Q1.0.4: What does XEmacs look like? @@ -823,7 +827,7 @@ @item Device subsystems @itemize @minus @item -X Windows: Jamie Zawinksi, Ben Wing, others +X Windows: Jamie Zawinski, Ben Wing, others @item GTK: William Perry, Malcolm Purvis @item @@ -887,7 +891,7 @@ @item Steve Youngs currently produces the beta releases (???). @item -Steve Youngs, Ville Skytta, and now Norbert Koch have taken turns +Steve Youngs, Ville Skyttä, and now Norbert Koch have taken turns maintaining the packages. @item Vin Shelton maintains the stable releases. @@ -3290,7 +3294,7 @@ Note that XEmacs finds the packages automatically anywhere underneath the directory tree where it expects to find the packages. All you need to do is put stuff there; you don't need to run any program to -tell XEmacs to find the packges, or do anything of that sort. +tell XEmacs to find the packages, or do anything of that sort. However, XEmacs will only notice newly installed packages when it starts up, so you will have to restart if you are already running @@ -3441,10 +3445,10 @@ As the exact files and their locations contained in a package may change it is recommended to remove a package first before installing a -new version. In order to facilitate removal each package contains an -pgkinfo/MANIFEST.pkgname file which list all the files belong to the -package. M-x package-admin-delete-binary-package RET can be used to -remove a package using this file. +new version. In order to facilitate removal each package contains a +pkginfo/MANIFEST.pkgname file which lists all the files belonging to +the package. M-x package-admin-delete-binary-package RET can be used +to remove a package using this file. Note that the interactive package tools included with XEmacs already do this for you. @@ -3536,7 +3540,7 @@ A typical error: FTP Error: USER request failed; 500 AUTH not understood. -Thanks to giacomo boffi @email{giacomo.boffi@@polimi.it} who recommends +Thanks to Giacomo Boffi @email{giacomo.boffi@@polimi.it} who recommends on comp.emacs.xemacs: tell your ftp client to not attempt AUTH authentication (or do not @@ -6113,6 +6117,7 @@ * Q5.0.4:: How can I have the window title area display the full path? * Q5.0.5:: @samp{xemacs -name junk} doesn't work? * Q5.0.6:: @samp{-iconic} doesn't work. +* Q5.0.7:: How can I use antialiased fonts under X11? 5.1: Microsoft Windows * Q5.1.1:: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? @@ -6261,7 +6266,7 @@ (make-frame '((name . "the-name"))) @end lisp -@node Q5.0.6, Q5.1.1, Q5.0.5, External Subsystems +@node Q5.0.6, Q5.0.7, Q5.0.5, External Subsystems @unnumberedsubsec Q5.0.6: @samp{-iconic} doesn't work. When I start up XEmacs using @samp{-iconic} it doesn't work right. @@ -6276,9 +6281,60 @@ bugs... @end quotation +@node Q5.0.7, Q5.1.1, Q5.0.6, External Subsystems +@unnumberedsubsec Q5.0.7: How can I use antialiased fonts under X11? + +The X11 version of XEmacs can use antialiased fonts via the Xft, +fontconfig, and freetype libraries. To configure this you need a recent +beta version (at least 21.5.24); the more recent, the better. This is +beta software, the usual caveats apply. Rebuild xemacs using the +following configure options, plus any others you normally use: + +@samp{--enable-mule --with-xft=emacs,menubars} + +Xft @emph{may} work without Mule but the developers working on the Xft +code invariably build with Mule. The tab control also supports Xft, and +at some date the progress gauge will as well. If they are configured in +to XEmacs, you may add @samp{tabs} and @samp{gauges} to the value of the +@samp{--with-xft} option (with a comma separating each value from the +previous ones). For further details on the XEmacs widgets that support +XFT, see the output of @code{./configure --help}. If you use a package +manager from your OS distribution, you may need to install development +packages for @file{fontconfig} and @file{Xft}, and possibly for their +prequisites. + +To specify a particular antialiased font, put something like the +following lines in your @file{~/.Xdefaults} or @file{~/.Xresources}: + +@example + XEmacs.default.attributeFont: monospace-12 + XEmacs.bold.attributeFont: monospace-12:style=Bold + XEmacs.italic.attributeFont: monospace-12:style=Oblique +XEmacs.bold-italic.attributeFont: monospace-12:style=Bold Oblique + XEmacs.modeline.attributeFont: sans-serif-11 + XEmacs.menubar.xftFont: sans-serif-11 + XEmacs*XftFont: sans-serif-11 +@end example + +@strong{Warning}: These resource naming conventions are just hacks to +get the code running; you should expect them to change. (Sorry about +that, but this @emph{is} beta software!) + +Then run @code{xrdb -merge} before starting the new, XFT-enabled +xemacs. You can choose the available fonts from the list given by +@code{fc-list}; try @code{xfd -fa FONTNAME-SIZE} to preview a given +font. Note that ``monospace'' and ``sans-serif'' are generic aliases +defined by fontconfig which may correspond to any of many real fonts +based on local configuration and availability of the aliased fonts, +and so are likely to give good results in a well-set-up system. + +Although Customize does not yet handle fontconfig fontspecs, you can +pass them as strings directly to @samp{set-face-font} to set fonts from +Lisp. + @unnumberedsec 5.1: Microsoft Windows -@node Q5.1.1, Q5.1.2, Q5.0.6, External Subsystems +@node Q5.1.1, Q5.1.2, Q5.0.7, External Subsystems @unnumberedsubsec Q5.1.1: Does XEmacs rename all the @samp{win32-*} symbols to @samp{w32-*}? In his flavor of Emacs 20, Richard Stallman has renamed all the @samp{win32-*} @@ -7159,7 +7215,7 @@ @node Q6.1.6, Q6.2.1, Q6.1.5, Internet @unnumberedsubsec Q6.1.6: Customization of VM not covered in the manual, or here. -@email{boffi@@hp735.stru.polimi.it, giacomo boffi} writes: +@email{boffi@@hp735.stru.polimi.it, Giacomo Boffi} writes: @quotation The meta-answer is to look into the file @file{vm-vars.el}, in the vm @@ -7350,7 +7406,7 @@ (setq load-path (nconc load-path '("foo" "bar"))) @end lisp -@email{keithh@@nortel.ca, keith (k.p.) hanlan} writes: +@email{keithh@@nortel.ca, Keith (k.p.) Hanlan} writes: @quotation To add directories using Unix shell metacharacters use @@ -8289,7 +8345,7 @@ development branches, one "stable" and one "experimental". Periodic releases happen in both branches, but those in the experimental branch are not tested as well, and there's no guarantee they will work at all. -The experiemental branch is open to any and all code that's acceptable +The experimental branch is open to any and all code that's acceptable to the developers; the stable branch, however, is in general limited only to bug fixes, and all contributions are carefully reviewed to make sure they will increase and not decrease stability. diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/cmdargs.texi --- a/man/xemacs/cmdargs.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/cmdargs.texi Sat Oct 25 21:40:46 2008 +0900 @@ -171,6 +171,27 @@ Do not process early packages. (For more information on startup issues concerning the package system, @xref{Startup Paths}.) +@item -script @var{file} +@item --script @var{file} +Load @var{file} as a (compiled or interpreted) Lisp file; do not load +any window-system or TTY code, do not load the user init file, the site +file, or the early packages. This is comparable to running +@samp{xemacs} @samp{-batch} @samp{-l} @var{file}. + +You can also specify this flag implicitly by calling the XEmacs binary +with a value for @samp{argv[0]} of @samp{xemacs-script}, normally by +means of a symbolic link. On a POSIX system, this means that adding the +line: + +@example +#!/usr/bin/env xemacs-script +@end example + +at the start of an XEmacs Lisp file, and changing that file's +permissions to executable, creates a script that can be invoked by +typing the path to the file. XEmacs has logic to ignore the #! line at +the start of the script, so that won't cause an error. + @item -vanilla This is equivalent to @samp{-q -no-site-file -no-early-packages}. diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/custom.texi --- a/man/xemacs/custom.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/custom.texi Sat Oct 25 21:40:46 2008 +0900 @@ -136,7 +136,7 @@ @c functions to enable or disable a given behavior. The behavior registry @c was introduced in XEmacs 21.5.6. @c -@c @defun enable-behavior behavior &optionl force +@c @defun enable-behavior behavior &optional force @c Called interactively, prompt the user, read a behavior symbol name with @c completion for @var{behavior}, and take @var{force} from the prefix @c argument. Then enable the behavior registered under the symbol @@ -2282,7 +2282,7 @@ @emph{convenient}. Precision means that all properties available in the programming API can be individually specified. Accuracy means that the truename of the font is exactly the list of all properties specified by -the font. Thus, the anomolies that occur with XLFDs on many servers +the font. Thus, the anomalies that occur with XLFDs on many servers (including modern Linux distributions with XFree86 or X.org servers) cannot occur. Convenience is subjective, of course. However, @file{fontconfig} provides a configuration system which (1) explicitly diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/frame.texi --- a/man/xemacs/frame.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/frame.texi Sat Oct 25 21:40:46 2008 +0900 @@ -343,7 +343,7 @@ XEmacs scrollbars provide the usual interface. Arrow buttons at either end allow for line by line scrolling, including autorepeat. Clicking in -the scrollbar itself provides scrolling by windowsfull, depending on +the scrollbar itself provides scrolling by a windowful, depending on which side of the slider is clicked. The slider itself may be dragged for smooth scrolling. @@ -400,7 +400,7 @@ example, change every time the selected buffer in the frame changes. And for progress gauges a gutter to contain the gauge is typically created on the fly when needed, then destroyed when the operation whose -staus is being displayed is completed. +status is being displayed is completed. Buffer tabs, having somewhat complex behavior, deserve a closer look. By default, a row of buffer tabs is displayed at the top of every frame. diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/keystrokes.texi --- a/man/xemacs/keystrokes.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/keystrokes.texi Sat Oct 25 21:40:46 2008 +0900 @@ -444,18 +444,23 @@ buffers. @xref{Key Sequences}, for information on representing key sequences to create key bindings. - ASCII graphic characters in Emacs buffers are displayed with their -graphics. @key{LFD} is the same as a newline character; it is displayed -by starting a new line. @key{TAB} is displayed by moving to the next -tab stop column (usually every 8 spaces). Other control characters are -displayed as a caret (@samp{^}) followed by the non-control version of -the character; thus, @kbd{C-a} is displayed as @samp{^A}. Non-ASCII -characters 128 and up are displayed with octal escape sequences; thus, -character code 243 (octal), also called @kbd{M-#} when used as an input -character, is displayed as @samp{\243}. + Printable characters (letters, numbers, punctuation and so on) in +XEmacs buffers are displayed as such. @key{LFD} (line feed, character +code @samp{\012} (octal)) is the same as a newline character; it is +displayed by starting a new line. @key{TAB} is displayed by moving to +the next tab stop column (usually every 8 spaces). Other control +characters below #x20 (hexadecimal) are displayed as a caret (@samp{^}) +followed by the non-control version of the character; thus, @kbd{C-a} is +displayed as @samp{^A}. Characters between (hexadecimal) #x80 and #xA0 +are displayed with octal escape sequences; thus, character code 243 +(octal), also called @kbd{M-#} when used as an input character, is +displayed as @samp{\243}. The variable @code{ctl-arrow} may be used to alter this behavior. -@xref{Display Vars}. +@xref{Display Vars}. As a rule, its value limits octal display to those +characters in the range just mentioned, and otherwise characters are +treated as printable, and will be displayed as themselves when the +relevant fonts are available. @node Commands, Non-Latin keyboards, Character Representation, Keystrokes @section Keys and Commands diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/mule.texi --- a/man/xemacs/mule.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/mule.texi Sat Oct 25 21:40:46 2008 +0900 @@ -509,7 +509,7 @@ Normally, unification works in the background by installing @code{unity-sanity-check} on @code{write-region-pre-hook}. Unification is on by default for the ISO-8859 Latin sets. The user -activates this functionality for other chacter set families by +activates this functionality for other character set families by invoking @code{enable-unification}, either interactively or in her init file. @xref{Init File, , , xemacs}. Unification can be deactivated by invoking @code{disable-unification}. @@ -1041,7 +1041,7 @@ possible to use a single Latin coded character set before saving the buffer. -Because the problem is rarely noticable in editing a buffer, but tends +Because the problem is rarely noticeable in editing a buffer, but tends to manifest when that buffer is exported to a file or process, unification uses the strategy of examining the buffer prior to export. If use of multiple Latin coded character sets is detected, unification diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/packages.texi --- a/man/xemacs/packages.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/packages.texi Sat Oct 25 21:40:46 2008 +0900 @@ -392,11 +392,11 @@ Because the exact files and their locations contained in a package may change it is recommended to remove a package first before installing a new version. In order to facilitate removal each package contains an -@file{pgkinfo/MANIFEST.pkgname} file which list all the files belonging +@file{pkginfo/MANIFEST.pkgname} file which lists all the files belonging to the package. No need to panic, you don't have to go through the -@file{pkinfo/MANIFEST.pkgname} and manually delete the files. Instead, use +@file{pkginfo/MANIFEST.pkgname} and manually delete the files. Instead, use @code{M-x package-get-delete-package RET}. Note that the interactive package tools included with XEmacs already do diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/programs.texi --- a/man/xemacs/programs.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/programs.texi Sat Oct 25 21:40:46 2008 +0900 @@ -75,7 +75,7 @@ supported by XEmacs. Examples include Ada, Awk, C, C++, CORBA (IDL), Fortran, Java, Lisp, Modula 2, Objective-C, Perl, Pike, Prolog, Python, Ruby, Scheme, Simula, SQL, Tcl, Unix Shell scripts, and VHDL. Some of -these language have seperate manuals, and some times more than one mode +these language have separate manuals, and some times more than one mode may be available for a language. For example, there are several variants of Lisp mode, which differ in the way they interface to Lisp execution. @xref{Lisp Modes}. @@ -1649,7 +1649,7 @@ @itemize @bullet @item -``gnu'' --- The recommeded style from the Free Software Foundation for +``gnu'' --- The recommended style from the Free Software Foundation for GNU software. @item ``k&r'' --- The classic style from Kernighan and Ritchie. @@ -1693,7 +1693,7 @@ Most customizations for indentation in various CC modes can be accomplished by choosing a style and then choosing value for @code{c-basic-offset} that meets the local coding convention. CC Mode -has a very customizable indentation engine and a furthur discussion is +has a very customizable indentation engine and a further discussion is really beyond the scope of this manual. @xref{Indentation Engine,,,cc-mode,The CC Mode Manual}. diff -r 71bf2c5667ba -r 66411359ce4e man/xemacs/trouble.texi --- a/man/xemacs/trouble.texi Sat Oct 25 20:35:36 2008 +0900 +++ b/man/xemacs/trouble.texi Sat Oct 25 21:40:46 2008 +0900 @@ -392,7 +392,7 @@ The newsgroup @samp{comp.emacs.xemacs} may be used for bug reports, other discussions and requests for assistance. -If you don't have access to this newgroup, you can subscribe to the +If you don't have access to this newsgroup, you can subscribe to the mailing list version: the newsgroup is bidirectionally gatewayed into the mailing list @samp{xemacs@@xemacs.org}. diff -r 71bf2c5667ba -r 66411359ce4e modules/ChangeLog --- a/modules/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,23 @@ +2008-02-12 Jerry James + + * canna/install-sh: Update to latest FSF version. + * ldap/install-sh: Ditto. + * postgresql/install-sh: Ditto. + * sample/external/install-sh: Ditto. + * sample/internal/install-sh: Ditto. + +2007-06-23 Stephen J. Turnbull + + * canna/canna_api.c (Fcanna_set_bunsetsu): + (Fcanna_initialize): + Suppress warnings about loss of precision on amd64. + +2007-06-23 Stephen J. Turnbull + + * ldap/eldap.h: Declare that we use deprecated API. + Thanks to Mats Lidell for the report & patch: + <871wgnqunm.fsf@spencer.lidell.homelinux.net>. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e modules/canna/canna_api.c --- a/modules/canna/canna_api.c Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/canna/canna_api.c Sat Oct 25 21:40:46 2008 +0900 @@ -333,11 +333,12 @@ */ (num)) { - int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */ + /* This is actually a Boolean! */ + char *kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */ - kugiri = NILP (num) ? 0 : 1; + kugiri = NILP (num) ? (char *) 0 : (char *) 1; - jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri); + jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, kugiri); return Qnil; } @@ -365,19 +366,19 @@ int res; char **p, **q; - int kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */ + /* This is actually a Boolean! */ + char *kugiri; /* ʸÀá¶èÀÚ¤ê¤ò¤¹¤ë¤«¡© (display clause separator?) */ IRCP_context = -1; if (NILP (num)) { - kugiri = 1; + kugiri = (char *) 1; } else { CHECK_INT (num); - kugiri = XINT (num); - kugiri = (kugiri == 1) ? 1 : 0; + kugiri = (XINT (num) == 1) ? (char *) 1 : (char *) 0; } if (NILP (server)) @@ -444,7 +445,7 @@ #endif /* CANNA_MULE */ #endif /* KC_SETAPPNAME */ - jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, (char *) kugiri); + jrKanjiControl (0, KC_SETBUNSETSUKUGIRI, kugiri); jrKanjiControl (0, KC_SETWIDTH, (char *) 78); #ifndef CANNA_MULE jrKanjiControl (0, KC_INHIBITHANKAKUKANA, (char *) 1); diff -r 71bf2c5667ba -r 66411359ce4e modules/canna/install-sh --- a/modules/canna/install-sh Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/canna/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -1,251 +1,519 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi - -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... - -d) dir_arg=true - shift - continue;; +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - -o) chowncmd="$chownprog $2" - shift - shift - continue;; +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; +while test $# -ne 0; do + case $1 in + -c) ;; - -s) stripcmd="$stripprog" - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + --help) echo "$usage"; exit $?;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` - if [ -f "$src" ] || [ -d "$src" ] - then - : + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : + mkdir_mode= fi -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp="${pathcomp}/" -done -fi + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi fi - -# don't allow the sed command to completely eliminate the filename + prefix=$prefix/ + done - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Make a temp file name in the proper directory. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -fi && + trap '' 0 + fi +done - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e modules/ldap/eldap.h --- a/modules/ldap/eldap.h Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/ldap/eldap.h Sat Oct 25 21:40:46 2008 +0900 @@ -22,6 +22,13 @@ #define INCLUDED_eldap_h_ #include +/* #### NEEDS REWRITE! + Thanks to Mats Lidell for the report & patch: + <871wgnqunm.fsf@spencer.lidell.homelinux.net> + "See http://www.openldap.org/faq/data/cache/1278.html. + Temporary workaround would be use the deprecated interface. Long term + solution is a rewrite." */ +#define LDAP_DEPRECATED 1 #include /* diff -r 71bf2c5667ba -r 66411359ce4e modules/ldap/install-sh --- a/modules/ldap/install-sh Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/ldap/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -1,251 +1,519 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi - -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... - -d) dir_arg=true - shift - continue;; +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - -o) chowncmd="$chownprog $2" - shift - shift - continue;; +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; +while test $# -ne 0; do + case $1 in + -c) ;; - -s) stripcmd="$stripprog" - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + --help) echo "$usage"; exit $?;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` - if [ -f "$src" ] || [ -d "$src" ] - then - : + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : + mkdir_mode= fi -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp="${pathcomp}/" -done -fi + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi fi - -# don't allow the sed command to completely eliminate the filename + prefix=$prefix/ + done - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Make a temp file name in the proper directory. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -fi && + trap '' 0 + fi +done - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e modules/postgresql/install-sh --- a/modules/postgresql/install-sh Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/postgresql/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -1,251 +1,519 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi - -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... - -d) dir_arg=true - shift - continue;; +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - -o) chowncmd="$chownprog $2" - shift - shift - continue;; +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; +while test $# -ne 0; do + case $1 in + -c) ;; - -s) stripcmd="$stripprog" - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + --help) echo "$usage"; exit $?;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` - if [ -f "$src" ] || [ -d "$src" ] - then - : + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : + mkdir_mode= fi -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp="${pathcomp}/" -done -fi + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi fi - -# don't allow the sed command to completely eliminate the filename + prefix=$prefix/ + done - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Make a temp file name in the proper directory. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -fi && + trap '' 0 + fi +done - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e modules/sample/external/install-sh --- a/modules/sample/external/install-sh Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/sample/external/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -1,251 +1,519 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi - -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... - -d) dir_arg=true - shift - continue;; +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - -o) chowncmd="$chownprog $2" - shift - shift - continue;; +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; +while test $# -ne 0; do + case $1 in + -c) ;; - -s) stripcmd="$stripprog" - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + --help) echo "$usage"; exit $?;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` - if [ -f "$src" ] || [ -d "$src" ] - then - : + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : + mkdir_mode= fi -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp="${pathcomp}/" -done -fi + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi fi - -# don't allow the sed command to completely eliminate the filename + prefix=$prefix/ + done - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Make a temp file name in the proper directory. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -fi && + trap '' 0 + fi +done - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e modules/sample/internal/install-sh --- a/modules/sample/internal/install-sh Sat Oct 25 20:35:36 2008 +0900 +++ b/modules/sample/internal/install-sh Sat Oct 25 21:40:46 2008 +0900 @@ -1,251 +1,519 @@ #!/bin/sh -# # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). + +scriptversion=2006-12-25.00 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# Copyright 1991 by the Massachusetts Institute of Technology +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi - -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... - -d) dir_arg=true - shift - continue;; +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - -o) chowncmd="$chownprog $2" - shift - shift - continue;; +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; +while test $# -ne 0; do + case $1 in + -c) ;; - -s) stripcmd="$stripprog" - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; + --help) echo "$usage"; exit $?;; - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - : +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` - if [ -f "$src" ] || [ -d "$src" ] - then - : + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - : + mkdir_mode= fi -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - : - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-${defaultIFS}}" + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - : - fi + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp="${pathcomp}/" -done -fi + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi fi - -# don't allow the sed command to completely eliminate the filename + prefix=$prefix/ + done - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - : - fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Make a temp file name in the proper directory. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && - -# Now rename the file to the real destination. + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -fi && + trap '' 0 + fi +done - -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff -r 71bf2c5667ba -r 66411359ce4e netinstall/ChangeLog --- a/netinstall/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/netinstall/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,7 @@ +2007-08-12 Mike Sperber + + * Makefile.in.in (datarootdir): Add. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e netinstall/Makefile.in.in --- a/netinstall/Makefile.in.in Sat Oct 25 20:35:36 2008 +0900 +++ b/netinstall/Makefile.in.in Sat Oct 25 21:40:46 2008 +0900 @@ -55,6 +55,7 @@ bindir=@bindir@ libdir=@libdir@ srcdir=@srcdir@ +datarootdir=@datarootdir@ datadir=@datadir@ instvardir=@instvardir@ top_srcdir=@top_srcdir@ diff -r 71bf2c5667ba -r 66411359ce4e nt/ChangeLog --- a/nt/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/nt/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,38 @@ +2008-05-13 Aidan Kehoe + + * xemacs.mak (PROGRAM_DEFINES): + Provide SHEBANG_PROGNAME on Win32 too. + +2008-01-25 Michael Sperber + + * xemacs.mak (version.sh): Generate version.sh via Mercurial. + +2008-01-24 Mike Sperber + + * config.inc.samp: Fix URL for optional libraries. + * xemacs.mak (PATH_PREFIX): Set PATH_PREFIX to the value of INSTALL_DIR. + * xemacs.mak (PATH_DEFINES): Fix setting of PATH_DEFINES. + * xemacs.mak (DEBUG_FLAG_COMPILE_DEBUG): Comment out -RTC1: it + even crashes with VC 8. + * xemacs.mak: Comment out echo line that leads to + command-line-too-long error on some Windowses. + +2008-01-18 Vin Shelton + + * xemacs.mak: Use debug version of Intel's libm, if appropriate. + +2008-01-17 Vin Shelton + + * config.inc.samp: Added USE_INTEL_COMPILER to support the Intel + compiler. + * xemacs.mak: Use USE_INTEL_COMPILER. + +2007-10-15 Adrian Aichner + + * xemacs.mak (INFO_FILES): Sync nt/xemacs.mak and man/Makefile + (adding beta.info). + * xemacs.mak (LISPREF_SRCS): Ditto. Adding packages.texi. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e nt/config.inc.samp --- a/nt/config.inc.samp Sat Oct 25 20:35:36 2008 +0900 +++ b/nt/config.inc.samp Sat Oct 25 21:40:46 2008 +0900 @@ -31,7 +31,7 @@ ############################################################################ # Directory under which the optional libraries are placed. To make your -# life easy, just grab http://ftp.xemacs.org/aux/optional-libs.exe +# life easy, just grab http://www.xemacs.org/Download/win32/optional-libs.exe # (a self-installing .ZIP) and unzip them into an appropriate directory # (by default, c:\src). This gets you precompiled versions of all of # the libraries below. @@ -257,3 +257,6 @@ # *AND CURRENTLY HAPPENS WITH VC++*, at least when using pdump. Therefore, # be warned! USE_UNION_TYPE=0 + +# Set this to build XEmacs with the Intel C Compiler. +USE_INTEL_COMPILER=0 diff -r 71bf2c5667ba -r 66411359ce4e nt/xemacs.mak --- a/nt/xemacs.mak Sat Oct 25 20:35:36 2008 +0900 +++ b/nt/xemacs.mak Sat Oct 25 21:40:46 2008 +0900 @@ -74,6 +74,13 @@ !endif !endif +!if [copy $(SRCROOT)\version.sh.in $(SRCROOT)\version.sh] +!endif +!if exist($(SRCROOT)\.hg) +!if [hg identify >> $(SRCROOT)\version.sh] +!endif +!endif + # Program name and version !include "$(SRCROOT)\version.sh" @@ -195,8 +202,11 @@ !if !defined(SUPPORT_EDIT_AND_CONTINUE) SUPPORT_EDIT_AND_CONTINUE=0 !endif +!if !defined(BUILD_FOR_SETUP_KIT) +BUILD_FOR_SETUP_KIT=0 +!endif -!if !defined(BUILD_FOR_SETUP_KIT) || "$(BUILD_FOR_SETUP_KIT)" == "0" +!if !$(BUILD_FOR_SETUP_KIT) OK_TO_USE_MSVCRTD=1 !else OK_TO_USE_MSVCRTD=0 @@ -417,6 +427,7 @@ -DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \ -DPATH_PROGNAME=\"infodock\" \ -DEMACS_PROGNAME=\"infodock\" \ + -DSHEBANG_PROGNAME=\"infodock-script\" \ -DEMACS_VERSION=\"$(INFODOCK_VERSION_STRING)\" \ -DINFODOCK_MAJOR_VERSION=$(infodock_major_version) \ -DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \ @@ -434,7 +445,7 @@ -DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \ -DPATH_PROGNAME=\"xemacs\" \ -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \ - -DEMACS_PROGNAME=\"xemacs\" + -DEMACS_PROGNAME=\"xemacs\" -DSHEBANG_PROGNAME=\"xemacs-script\" !endif ########################### Set up installation and package directories. @@ -455,10 +466,10 @@ !if $(INFODOCK) PATH_PREFIX=../.. !else -PATH_PREFIX=.. +PATH_PREFIX="$(INSTALL_DIR)" !endif -PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\" +PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX:\=\\)\" !if $(SEPARATE_BUILD) PATH_DEFINES=$(PATH_DEFINES) -DPATH_LOADSEARCH=\"$(LISP:\=\\)\" -DPATH_DATA=\"$(ETC:\=\\)\" -DPATH_INFO=\"$(INFO:\=\\)\" @@ -658,6 +669,16 @@ $(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj !endif +!if $(USE_INTEL_COMPILER) +CC=icl +# Use static library if possible +INTEL_LIBS=libircmt.lib libmmt.lib +# Debugging requires DLL version of libm +!if $(DEBUG_XEMACS) +INTEL_LIBS=libircmt.lib libmmd.lib +!endif +!endif + ########################### Process options related to compilation. # @@ -678,8 +699,8 @@ # giving it. DEBUG_FLAG_LINK_DEBUG=-debug -opt:noref # This turns on additional run-time checking -# For some reason it causes spawning of make-docfile to crash in VC 7 -DEBUG_FLAG_COMPILE_DEBUG=-RTC1 +# For some reason it causes spawning of make-docfile to crash in VC 7 and VC 8 +# DEBUG_FLAG_COMPILE_DEBUG=-RTC1 ! else DEBUG_FLAG_LINK_DEBUG=-debug:full DEBUG_FLAG_COMPILE_DEBUG= @@ -803,7 +824,7 @@ $(EMACS_BETA_VERSION) $(EMACS_PATCH_LEVEL) \ -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \ !if defined(xemacs_extra_name) - -DXEMACS_EXTRA_NAME=\"$(xemacs_extra_name:"=)\" \ + -DXEMACS_EXTRA_NAME=\""$(xemacs_extra_name:"=)"\" \ !endif !if defined(PATH_LATE_PACKAGE_DIRECTORIES) -DPATH_LATE_PACKAGE_DIRECTORIES=\"$(PATH_LATE_PACKAGE_DIRECTORIES)\" \ @@ -1290,7 +1311,7 @@ TEMACS_LIBS=$(LASTFILE) $(OPT_LIBS) \ oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \ shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \ - mpr.lib uuid.lib imm32.lib $(LIBC_LIB) + mpr.lib uuid.lib imm32.lib $(INTEL_LIBS) $(LIBC_LIB) TEMACS_COMMON_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \ -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \ -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj @@ -1353,7 +1374,8 @@ !endif $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP) - @echo link $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS) +# Command line too long for some Windows installation: +# @echo link $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS) link.exe @<< $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS) << @@ -1447,21 +1469,22 @@ MANDIR = $(SRCROOT)\man INFODIR = $(SRCROOT)\info INFO_FILES= \ + $(INFODIR)\beta.info \ $(INFODIR)\cl.info \ $(INFODIR)\custom.info \ $(INFODIR)\emodules.info \ $(INFODIR)\external-widget.info \ $(INFODIR)\info.info \ + $(INFODIR)\internals.info \ + $(INFODIR)\lispref.info \ + $(INFODIR)\new-users-guide.info \ $(INFODIR)\standards.info \ $(INFODIR)\term.info \ $(INFODIR)\termcap.info \ $(INFODIR)\texinfo.info \ $(INFODIR)\widget.info \ $(INFODIR)\xemacs-faq.info \ - $(INFODIR)\xemacs.info \ - $(INFODIR)\lispref.info \ - $(INFODIR)\new-users-guide.info \ - $(INFODIR)\internals.info + $(INFODIR)\xemacs.info {$(MANDIR)}.texi{$(INFODIR)}.info: cd $(MANDIR) @@ -1559,6 +1582,7 @@ $(MANDIR)\lispref\numbers.texi \ $(MANDIR)\lispref\objects.texi \ $(MANDIR)\lispref\os.texi \ + $(MANDIR)\lispref\packaging.texi \ $(MANDIR)\lispref\positions.texi \ $(MANDIR)\lispref\processes.texi \ $(MANDIR)\lispref\range-tables.texi \ diff -r 71bf2c5667ba -r 66411359ce4e src/ChangeLog --- a/src/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/src/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,1032 @@ +2008-10-25 Stephen J. Turnbull + + * lisp.h (static_pro): Cast out a warning. + g++ 4.3 complains about the conversion of const char to char. + These end up in a dynarray, so we would need to define a whole new + class of dynarray just to handle the const char stuff. + +2008-08-27 Aidan Kehoe + + * symbols.c (Fuser_variable_p): + (map_varalias_chain): + Use EQ() and !EQ(), don't compare two Lisp_Objects using == and + !=. Fixes the union build, thank you Robert Delius Royar. + +2008-08-23 Aidan Kehoe + + * eval.c (Fuser_variable_p): Moved to symbols.c + * symbols.c (Fcustom_variable_p): Moved here from custom.el. + (user_variable_alias_check_fun): Mapper function used in + `user-variable-p'. + (Fuser_variable_p): Moved here from eval.c, to allow it to examine + the variable alias chain. Expanded to check each entry in the + variable alias chain for signs of being a user variable; + documentation updated, noting the differences between GNU's + behaviour and ours (ours is a little more sensible) + (map_varalias_chain): New. + Given a C function, call it at least once for each symbol in a + symbol's varalias chain, signalling an error if there's a cycle, + and returning immediately if the function returns something other + than Qzero. + (Fdefvaralias): Correct the use of the word "alias" in the + docstring and in the argument name. Motivate this in a + comment. Add support for a DOCSTRING argument, something GNU has + too, and document this + * gc.c (vars_of_gc): Start the docstring of + `garbage-collection-messages' with an asterisk, to indicate that + it's a user variable. + +2008-08-09 Aidan Kehoe + + Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change, + which can allow much better performace with some stupid + filesystems: + * fileio.c (write_region_inhibit_fsync): New variable. + (Fwrite_region): Use it to skip call to fsync. + (syms_of_fileio): Initialize it. + +2008-08-10 Aidan Kehoe + + * objects-xlike-inc.c (charset_table): Remove the entry for + Vcharset_arabic_iso8859_7, thank you Robert Delius Royar. + +2008-08-05 Aidan Kehoe + + * mule-charset.c (complex_vars_of_mule_charset): + Remove Vcharset_arabic_iso8859_7. + * lisp.h: Remove Vcharset_arabic_iso8859_7. + See commentary in lisp/mule/iso-with-esc.el for motivation. + +2008-08-03 Mats Lidell + + * config.h.in: Renamed USE_XFT_GAUGE to USE_XFT_GAUGES in sync + with configure.ac. + +2008-07-20 John Paul Wallington + + * nt.c (Fmswindows_short_file_name, Fmswindows_long_file_name): + Remove their interactive specs; they shouldn't be called interactively. + +2008-07-17 Aidan Kehoe + + * redisplay.c (init_redisplay): + Don't set window-system to 'stream if running noninteractively, + revert to the documented behaviour. + +2008-07-16 Aidan Kehoe + + * lread.c (read_escape): + Error if we're handed an over-long hex character escape, something + which arises reasonably frequently in code written for GNU. + +2008-07-07 Aidan Kehoe + + Patch to make it up to the device-specific code whether + various Lisp functions should be called during device creation, + not relying on the startup code to decide this. Also, rename + initial-window-system to initial-device-type (which makes more + sense in this scheme), always set it. + + * redisplay.c (Vinitial_device_type): New. + (Vinitial_window_system): Removed. + Rename initial-window-system to initial-device type, making it + a stream if we're noninteractive. Update its docstring. + + * device-x.c (Qmake_device_early_x_entry_point, + Qmake_device_late_x_entry_point): New. + Rename Qinit_pre_x_win, Qinit_post_x_win. + (x_init_device): Call #'make-device-early-x-entry-point earlier, + now we rely on it to find the application class and the + app-defaults directory. + (x_finish_init_device): Call #'make-device-late-x-entry-point with + the created device. + (Vx_app_defaults_directory): Always make this available, to + simplify code in x-init.el. + + * device-tty.c (Qmake_device_early_tty_entry_point): New. + Rename Qinit_pre_tty_win, rename Qinit_post_tty_win and move to + frame-tty.c as Qmake_frame_after_init_entry_point. + (tty_init_device): Call #'make-device-early-tty-entry-point before + doing anything. + * frame-tty.c (Qmake_frame_after_init_entry_point): New. + * frame-tty.c (tty_after_init_frame): Have it call the + better-named #'make-frame-after-init-entry-point function + instead of #'init-post-tty-win (since it's called after frame, not + device, creation). + + * device-msw.c (Qmake_device_early_mswindows_entry_point, + Qmake_device_late_mswindows_entry_point): New. + Rename Qinit_pre_mswindows_win, Qinit_post_mswindows_win. + (mswindows_init_device): Call + #'make-device-early-mswindows-entry-point here, instead of having + its predecessor call us. + (mswindows_finish_init_device): Call + #'make-device-early-mswindows-entry-point, for symmetry with the + other device types (though it's an empty function). + + * device-gtk.c (Qmake_device_early_gtk_entry_point, + Qmake_device_late_gtk_entry_point): New. + Rename Qinit_pre_gtk_win, Qinit_post_gtk_win. + (gtk_init_device): Call #'make-device-early-gtk-entry-point; don't + load ~/.xemacs/gtk-options.el ourselves, leave that to lisp. + (gtk_finish_init_device): Call #'make-device-late-gtk-entry-point + with the created device as an argument. + +2008-07-10 Aidan Kehoe + + * redisplay-msw.c (mswindows_text_width_single_run): + Explicitly check for the null font instance, and return zero if + so. Avoids the crash documented in + http://mid.gmane.org/18473.32468.712317.149457@parhasard.net . + +2008-05-27 Aidan Kehoe + + * editfns.c (Ftranslate_region): + Correct a thinko in the last commit; I meant #'get-char-table, not + #'put-char-table. + +2008-05-25 Aidan Kehoe + + * chartab.c (Fmake_char_table): + Document the default return values for the various char table + types. + * editfns.c (Ftranslate_region): Document why `generic' char tables + are preferable to `char' char tables for this function. + +2008-05-21 Aidan Kehoe + + * fileio.c (Fmake_symbolic_link): + Document behaviour when the underlying OS doesn't support symbolic + links. + +2008-05-13 Aidan Kehoe + + * emacs.c (SHEBANG_EXE_PROGNAME_LENGTH): + Use WEXTSTRING separately on the two concatenated strings, + avoiding an error on Win32. + +2008-05-13 Aidan Kehoe + + * config.h.in (_CRT_NONSTDC_NO_DEPRECATE): + Define this, to avoid warnings about using standard POSIX and C9X + functions on Win32; fixes part of Matthew Persico's problems of + 9ea6aaa80805081832r1a3308e9wb6d2bfea7457379f@mail.gmail.com . + +2008-01-20 Aidan Kehoe + + * config.h.in: Add SHEBANG_PROGNAME. + * emacs.c (main_1): + If we've been called using SHEBANG_PROGNAME, rewrite our arguments + to add a --script argument. + Also, handle the --script argument by setting noninteractive and + vanilla. + * lread.c (Fload_internal): + If the first two characters of a file are #!, replace them with ;! + before they get to the Lisp reader. + +2008-04-26 Mike Sperber + + * window.c (set_window_pixsize): Round up when we're shrinking, + down when we're growing * to make sure that pairs of grow / shrink + meant to * cancel out actually do cancel out. This fixes a + problem with `resize-minibuffer-mode' where successive grow/shrink + actions are meant to cancel out, but previously didn't. + +2008-04-05 Aidan Kehoe + + * depend: + Regenerate with LF line endings, not CRLF. + +2008-03-15 Michael Sperber + + * lread.c (read1): Signal an error on ?\, thus preventing + an assertion failure higher up. + +2008-03-11 Stephen J. Turnbull + + * specifier.c (CHECK_INSTANCE_ENTRY): Fix typo in comment. + +2008-03-05 Dominique Quatravaux + + * glyphs-gtk.c (init_image_instance_from_gdk_image): + (gtk_colorize_image_instance): + Use IMAGE_INSTANCE_PIXMAP_MASK (an lvalue), not + IMAGE_INSTANCE_GTK_MASK (an rvalue). + +2008-03-05 Dominique Quatravaux + + * console-gtk.c (gtk_perhaps_init_unseen_key_defaults): Fix typo. + +2008-02-28 Didier Verna + + * specifier.h (struct specifier_methods): Fix instantiate_method + prototype to match the changes below. + +2008-02-26 Didier Verna + + * specifier.c (CHECK_INSTANCE_ENTRY): See below. + * specifier.c (specifier_instance_1): Propagate the no_fallback + flag to ... + * specifier.c (specifier_instance_from_inst_list): ... here, and + in turn propagate it to the _instantiate methods. + * glyphs.c (image_instantiate): Handle the no_fallback flag. + * objects.c (color_instantiate): Ditto. + * objects.c (font_instantiate): Ditto. + * objects.c (face_boolean_instantiate): Ditto. + * specifier.c (specifier_matching_foo_from_inst_list): Update call + to specifier_instance_from_inst_list accordingly. + +2008-02-11 Aidan Kehoe + + * search.c (search_buffer): + In the event that a character is not representable in the buffer, + fail immediately. Prevents an assertion failure in the code to + deal with whether Boyer-Moore search can be used for such + characters. + +2008-02-03 Jerry James + + * redisplay.c (generate_displayable_area): If a line has been + generated in place in the dynarray, use Dynarr_increment instead + of Dynarr_add. + * redisplay.c (regenerate_window): Ditto. + +2008-02-01 Jerry James + + * event-Xt.c (emacs_Xt_event_handler): Remove unnecessary call to + SET_EVENT_MAGIC_X_EVENT. See xemacs-beta message + <870180fe080131201011b191ae5g1d70cbd2136f570c@mail.gmail.com>. + +2008-01-30 Aidan Kehoe + + * search.c (debug-xemacs-searches): + New variable, available on debug builds. Used in + tests/automated/case-tests.el. + (search_buffer): Only store the charset_base for characters with + translations. Correct some comments, correct some checks. If + debug_xemacs_searches is non-zero, record which search was used. + (boyer_moore): Remove an assertion that was incorrect. Remove its + documentation. Correct an assertion dealing with equivalence + tables; we may end up looking through the equivalence table if a + non-ASCII non-case character was searched for. + +2008-01-25 Michael Sperber + + * emacs.c (vars_of_emacs): Zap mention of CVS. + +2008-01-24 Mike Sperber + + * make-src-depend (PrintDeps): Fix Perl code that no longer works + with Perl 5.10. + +2008-01-21 Aidan Kehoe + + * elhash.c (Fputhash): Document the return value. + (Fclrhash): Ditto. + +2007-12-26 Aidan Kehoe + + * casetab.c: + Extend and correct some case table documentation. + * search.c (search_buffer): + Correct a bug where only the first entry for a character in the + case equivalence table was examined in determining if the + Boyer-Moore search algorithm is appropriate. + + If there are case mappings outside of the charset and row of the + characters specified in the search string, those case mappings can + be safely ignored (and Boyer-Moore search can be used) if we know + from the buffer statistics that the corresponding characters cannot + occur. + + * search.c (boyer_moore): + Assert that we haven't been passed a string with varying + characters sets or rows within character sets. That's what + simple_search is for. + + In the very rare event that a character in the search string has a + canonical case mapping that is not in the same character set and + row, don't try to search for the canonical character, search for + some other character that is in the the desired character set and + row. Assert that the case table isn't corrupt. + + Do not search for any character case mappings that cannot possibly + occur in the buffer, given the buffer metadata about its + contents. + +2008-01-19 Aidan Kehoe + + * dired.c (Ffile_attributes): If bignums are available, use them + for the file size when necessary. If they are not, be clearer + about the check for whether the file size can fit in a Lisp + integer. + +2008-01-18 Jerry James + + * device-x.c (x_init_device): Don't write to path or read from + format when neither has been initialized. + +2008-01-16 Aidan Kehoe + + * elhash.c (internal_hash): + Make short lists with the same contents in a different order hash + distinctly. Gives better performance for things like three-element + lists describing colours. Thank you Sebastian Freundt! + +2008-01-15 Aidan Kehoe + + * print.c (prin1_to_string): New. + The guts of Fprin1_to_string, without resetting + Vprint_gensym_alist. + (Fprin1_to_string): + Call prin1_to_string, wrapped with RESET_PRINT_GENSYM calls. + * doprnt.c (emacs_doprnt_1): + Call prin1_to_string, not Fprin1_to_string (dos veces). Avoids an + inappropriate reset of print-gensym-alist. + +2008-01-12 Aidan Kehoe + + * rangetab.c (Fmap_range_table): + Clarify docstring. (If FUNCTION doesn't touch any range-table + entry, things will also be correct.) + +2008-01-09 Aidan Kehoe + + * config.h.in: + Check that __STDC_VERSION__ is defined before examining its + value. Eliminates a Cygwin warning. + +2008-01-08 Aidan Kehoe + + * text.h (MAX_XETCHAR_SIZE): Remove, eliminating a redefinition + warning on Win32. + * dumper.c (pdump_load): + Don't use PATH_MAX_EXTERNAL, instead allocate enough for the path + + DUMP_SLACK (space for .dmp and version information), already + used on Win32 and #defined to be 100. + +2008-01-08 Jerry James + + * config.h.in (INLINE_HEADER): adapt to C99 inline semantics. + +2008-01-07 Jerry James + + * xemacs.def.in.in: Clarify the copyright and license. + +2008-01-03 Aidan Kehoe + + * fileio.c (Fmake_temp_name): Correct the comment to cross + reference to make-temp-file, and not to this function. + +2008-01-03 Stephen J. Turnbull + + * doc.c (Fbuilt_in_symbol_file): Improve style. + +2008-01-02 Aidan Kehoe + + * emacs.c (main_1): + Call the new vars_of_console_gtk function. + * console-gtk.c (vars_of_console_gtk): New. + * console-gtk.c (gtk_perhaps_init_unseen_key_defaults): + Correct the initialisation of the hash table, on the model of the + MSW and TTY builds. + +2008-01-02 Aidan Kehoe + + * doc.c (Fbuilt_in_symbol_file): + Don't check is fun zero in the condition, check that it's not + nil. Fixes the union build; thank you Stephen. + +2008-01-02 Mike Sperber + + * window.c (set_window_pixsize): Factor in the modeline when + looking at window_min_width. Remove obsolete comment about + incorrect use of `default_face_height_and_width'. + (change_window_height): Remove obsolete comment about + incorrect use of `default_face_height_and_width'. + +2007-12-30 Aidan Kehoe + + * doc.c (Fbuilt_in_symbol_file): + Take a new TYPE argument, specifying whether the function or + variable definition of the symbol should be searched for. + Handle built-in macros correctly. + +2007-12-24 Aidan Kehoe + + * event-xlike-inc.c (x_keysym_to_character): + * event-xlike-inc.c (gtk_keysym_to_character): + Unify the typed character if possible, following the current value + for the unicode precedence list. + +2007-12-24 Aidan Kehoe + + * symbols.c (Fintern_soft): + Provide a new optional third argument, DEFAULT, for those who want + to check if "nil" is a symbol or not. (More realistically, general + code that may get handed "nil" should probably use this argument.) + +2007-12-23 Aidan Kehoe + + * objects-tty.c (tty_find_charset_font): + * objects-msw.c (mswindows_font_spec_matches_charset_stage_2): + * objects-msw.c (mswindows_font_spec_matches_charset_stage_1): + * objects-xlike-inc.c (x_font_spec_matches_charset): + * objects-xlike-inc.c (gtk_font_spec_matches_charset): + If the charset is not specified when calling the + font_spec_matches_charset device method, its value is Qnil, not + Qunbound. See + http://mid.gmane.org/E1EfbmW-00029r-5G@iwi191.iwi.uni-sb.de and + Ben Wing's patch of + http://mid.gmane.org/439FA06B.3090007@xemacs.org. + +2007-12-22 Aidan Kehoe + + * database.c (Fopen_database): + Actually respect the CODESYS argument; don't require EOL + autodetection from the coding system, because autodetection mostly + fails with reads of small amounts of data. It might be possible + with an implicit #'map-database on open, though I don't think + that's a great idea. + * database.c (print_database): + Give the coding system used for text conversion when printing a + database object. + +2007-12-20 Jerry James + + * sound.c: Fix unused parameter warnings when HAVE_ALSA_SOUND. + +2007-12-18 Kenny Chien + + * extw-Xt.c (extw_wait_for_response): Don't use undocumented + internal Xt functions, avoiding inconsistent behavior between + different Solaris versions. + +2007-12-18 Aidan Kehoe + + * symbols.c (Fspecial_form_p): + Following commentary from Jerry James, don't error if not passed a + subr. + + Flesh out the docstring; give details of what a subr is, what a + special form is, and why one should probably not write special + forms oneself. + +2007-12-18 Aidan Kehoe + + * symbols.c (Fspecial_form_p): New. + For the use of advice.el, and perhaps other files; is SUBR a + special form? + +2007-12-17 Aidan Kehoe + + * doprnt.c (emacs_doprnt_1): + Add support for formatted printing of both longs and bignums as + base 2. + * editfns.c (Fformat): + Document the new %b escape for #'format. + * lisp.h: + Make ulong_to_bit_string available beside long_to_string. + * lread.c: + Fix a bug where the integer base was being ignored in certain + contexts; thank you Sebastian Freundt. This is necessary for + correct behaviour of #'integer-to-bit-vector and + #'bit-vector-to-integer, just added to subr.el + * print.c (ulong_to_bit_string): New. + Analagous to long_to_string, but used all the time when %b is + encountered, since we can't pass that to sprintf. + +2007-12-12 Aidan Kehoe + + * config.h.in: + Make the results of the checks for + FcConfigGetRescanInterval, FcConfigSetRescanInterval + available. + * font-mgr.h: + If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not + available as functions, #define them to map to their old + misspelled names. + * font-mgr.c (Ffc_config_get_rescan_interval): + * font-mgr.c (Ffc_config_set_rescan_interval): + Use the correct spelling in + FcConfigGetRescanInterval, FcConfigSetRescanInterval + +2007-12-11 Aidan Kehoe + + * glyphs-eimage.c: + Merge Ron Isaacson's patch of + 3ggprxj7ifh.wl_Ron.Isaacson@morganstanley.com , originally from + Gennady Khokhorin. Prevents library incompatibilities on Win32. + +2007-12-11 Aidan Kehoe + + * fileio.c (Fsubstitute_in_file_name): + On encountering non-existent environment variables or incorrect + syntax for specifying environment variables (as is routine on + Windows) don't error, instead pass the original strings through. + +2007-12-05 Stephen J. Turnbull + + * search.c (simple_search): Fix underrun in reverse search. + (search_buffer): Clarify decision to use boyer_moore or not. + +2007-12-06 Aidan Kehoe + + * tests.c (Ftest_data_format_conversion): + Move those tests that expect that iso-8859-2 is ISO + 2022-compatible to testing iso-latin-2-with-esc instead. + +2007-12-02 Ron Isaacson + + * frame.c (change_frame_size): + (change_frame_size_1): + Must reset pending flag per-frame, so do it in the latter. + +2007-12-04 Aidan Kehoe + + * file-coding.c: + * file-coding.c (find_coding_system): + C-accessible version of #'find-coding-system that doesn't + necessarily call the autoload code, for use in + #'autoload-coding-system (which we allow to overwrite autoloaded + coding systems) and make_coding_system_1 (which has to). + * file-coding.c (Ffind_coding_system): + Move the implementation to find_coding_system; call that function + with a do_autoloads argument of 1. + * file-coding.c (Fautoload_coding_system): + New. + * file-coding.c (add_coding_system_to_list_mapper): + When returning a list of coding systems, don't call the autoload + code. + * file-coding.c (make_coding_system_1): + * file-coding.c (Fcopy_coding_system): + * file-coding.c (syms_of_file_coding): + + Implement autoloaded coding systems. The form to be evaluated to + load a given coding system is stored as the value in + Vcoding_system_hash_table; this form is evaluated if + find-coding-system is called with the symbol name of the coding + system as its argument. + + This is also tied in with the POSIX locale infrastructure by means + of posix-charset-to-coding-system-hash. + +2007-11-29 Aidan Kehoe + + * mule-ccl.c (ccl_driver): + Take out a static variable I was using for debugging. + +2007-11-26 Aidan Kehoe + + * doprnt.c: + Default to a buffer size of 350 for the sprintf call, but increase + it if the precision and minwidth indicate that it should be + bigger. Issue reported by Hans de Graaff; bug originally fixed by + Sebastian Freundt in SXEmacs following the change I merged on + 2006-11-28. Forks have their disadvantages. + +2007-11-11 Mats Lidell + + * events.h: Based on SXEmacs patch. Support for mouse button 6 to + 26. + * keymap.h: Ditto. + * keymap.c: Ditto. + +2007-11-15 Aidan Kehoe + + * unicode.c (coding_system_type_create_unicode): + * unicode.c (vars_of_unicode): + Move the initialisation of Vnumber_of_jit_charsets, + Vlast_jit_charset_final, Vcharset_descr to an #ifdef MULE block in + vars_of_unicode. Fixes a build failure reported by Vin + Shelton--thank you Vin! + +2007-11-14 Aidan Kehoe + + * lread.c (read_unicode_escape): + Correct the range check for Unicode characters specified with + source-level escapes. + * unicode.c: + * unicode.c (unicode_to_ichar): + * unicode.c (coding_system_type_create_unicode): + Correct the dump behaviour for just-in-time Unicode code + points. Update the docstring for #'unicode-to-char to indicate + that code points will run out above around 400,000 in a session. + +2007-11-14 Aidan Kehoe + + * editfns.c (vars_of_editfns): + Correct the docstring of user-full-name. + * fileio.c: + * fileio.c (Fmake_temp_name): + Document that make-temp-file is available and the best approach to + this. + * fileio.c (Fwrite_region_internal): + Take a new arg, MUSTBENEW, to error if the file to be written + already exists. + * fileio.c (auto_save_1): + Update a call to Fwrite_region_internal to pass the new argument. + * fileio.c (syms_of_fileio): + Provide 'excl as a symbol, for the calls to + write-region-internal. + +2007-11-05 Didier Verna + + * glyphs.c (potential_pixmap_file_instanciator): Fix comment + describing its behavior. + * glyphs.c (xbm_mask_file_munging): Update semantics of file and + mask_file arguments to reflect recent changes in + potential_pixmap_file_instanciator (see patch below). + * glyphs-x.c (autodetect_normalize): Update call to + xbm_mask_file_munging to reflect the above change. + * glyphs-gtk.c (autodetect_normalize): Ditto. + +2007-10-10 Didier Verna + + * glyphs.c (potential_pixmap_file_instantiator): Make a difference + between not being able to locate a pixmap file, and not having a + console method to do so. + * glyphs.c (simple_image_type_normalize): Notice that difference, + and don't err when the method is unavailable. + * glyphs.c (xbm_normalize): Ditto. + * glyphs.c (xface_normalize): Ditto. + * glyphs.c (xpm_normalize): Ditto. + * glyphs-shared.c (shared_resource_normalize): Ditto. + * glyphs-x.c (x_locate_pixmap_file): Recognize ~ pathnames as + fully qualified. + +2007-10-03 Didier Verna + + * faces.c (reset_face_cachels): Check for noninteractive mode in + the assertions below, in which case the cache is unused. + +2007-10-03 Didier Verna + + * faces.c (reset_face_cachels): Assert correct order of built-in + faces additions to the face cache, as per suggestion from Aidan. + +2007-10-03 Didier Verna + + Again, fix some DEFAULT_INDEX == 0 assumptions. Actually, properly + initialize display_line structures. + + * redisplay.h (DISPLAY_LINE_INIT): New macro. Properly initialize + the default_index field to DEFAULT_INDEX. + * frame.c (init_frame): Use it. + * redisplay.c (ensure_modeline_generated): Ditto. + * redisplay.c (generate_displayable_area): Ditto. + * redisplay.c (regenerate_window): Ditto. + * redisplay-output.c (sync_display_line_structs): Ditto. + * redisplay-output.c (redisplay_output_layout): Ditto. + +2004-12-08 Shyamal Prasad + + * editfns.c: + * editfns.c (Fformat_time_string): + Added documentation for %z, %g, %G and %V specifiers. This synchs + up the set of % specifiers for format-time-string with Emacs + 21.3.1. Make copy of static buffer returned by localtime(). + + * strftime.c: + * strftime.c (strftime): + Implemented %z, %g, %G and %V in a style similar to existing + implementation of other specifiers. + +2007-09-30 Stephen J. Turnbull + + * search.c (Freplace_match): Improve range-checking on STRBUFFER. + +2007-09-22 Stephen J. Turnbull + + * search.c (Freplace_match): Allow STRBUFFER to specify a + subexpression when the source is a string. + +2007-09-30 Aidan Kehoe + + * mule-ccl.c: + * mule-ccl.c (CCL_CALL_FOR_MAP_INSTRUCTION): + * mule-ccl.c (ccl_driver): + Merge Kenichi Handa's 2004-06-12 GNU bugfix, handling EOF in + ccl_driver correctly. + +2007-09-26 Didier Verna + + More fixes similar to previous patch: + + * faces.c (reset_face_cachels): Add informative comment about the + order of faces cache addition. + * redisplay.h: Ditto. + * redisplay-output.c (output_display_line): Don't rely on + DEFAULT_INDEX being 0. + * redisplay.c (create_string_text_block): Ditto. + +2007-09-26 Didier Verna + + * gutter.c (calculate_gutter_size): Don't hardwire face index to + 0: use DEFAULT_INDEX instead. + +2006-11-26 Aidan Kehoe + + * eval.c (Fcommand_execute): + * eval.c (Feval): + * eval.c (Ffuncall): + Use the PROFILE_DECLARE macro instead of declaring `struct + backtrace backtrace' by hand. + * profile.h: + * profile.h (PROFILE_EXIT_FUNCTION): + * profile.h (PROFILE_ENTER_FUNCTION): + Check do_backtrace before passing the backtrace structure to + profile_record_about_to_call, profile_record_just_called. + +2007-08-28 Aidan Kehoe + + * mule-ccl.c (ccl_driver): + Revert the last change to mule-ccl.c, on objection from SL + Baur. The change to lisp.h in the same commit sufficed. + +2007-08-17 Marcus Crestani + + * buffer.c (Fkill_buffer): + * objects-tty.c (tty_finalize_color_instance): + * objects-tty.c (tty_finalize_font_instance): + * objects-tty.c (console_type_create_objects_tty): + * syntax.c (uninit_buffer_syntax_cache): Keep functions that do + nothing for NEW_GC instead of removing them. + +2007-08-18 Vin Shelton + + * frame-msw.c (mswindows_init_frame_3): Restore extra call to + ShowWindow so that cygwin's run command can be used to open an + XEmacs session. Without this, no frame appears when the XEmacs + process starts up. + +2006-10-26 Nix + + * dumper.c (pdump_load): Statically allocate a large enough + exe_path for all conceivable uses. Fixes a buffer overrun. + * text.h (MAX_XETCHAR_SIZE): Define, for PATH_MAX_EXTERNAL. + +2007-08-21 Aidan Kehoe + + * mule-ccl.c (ccl_driver): + Don't pass XCHAR_OR_INT an argument of which the evaluation has + side effects; thank you Mike Fabian. + * lisp.h: + Redundantly, don't multiply evaluate the argument to XCHAR_OR_INT; + this should prevent the same error in the future. + +2007-08-17 Marcus Crestani + + * mc-alloc.c (L1_INDEX): + * mc-alloc.c (PAGE_SIZE_ALIGNMENT): + * mc-alloc.c (set_bit): + * mc-alloc.c (init_mc_allocator): Use EMACS_UINT with bit + shifting. + +2007-08-15 Marcus Crestani + + * database.c (dbm_map): Add typecast. + * database.c (dbm_get): Add typecast. + * gc.c (gc_state_type): Declare type. + * objects-tty.c (tty_find_charset_font): Add typecast. + * objects-xlike-inc.c (count_hyphens): Add typecast. + * objects-xlike-inc.c (endif): Add typecast. + +2007-08-15 Marcus Crestani + + * input-method-xlib.c (EmacsFreeXIMStyles): + * lisp.h: + * process-unix.c (connect_to_file_descriptor): + * process-unix.c (create_bidirectional_pipe): + * process-unix.c (unix_create_process): + * process-unix.c (unix_open_network_stream): + * process-unix.c (unix_open_multicast_group): Convert pointers to + EMACS_INTs instead of ints. + * vdb.c (Ftest_vdb): Print adresses as pointers. + +2007-08-14 Marcus Crestani + + * s/sol2.h: Fix for GCC lossage not needed with SunOS 5.10. + +2007-08-15 Marcus Crestani + + * buffer.c (Fkill_buffer): + * console-tty.c (free_tty_console_struct): + * device-gtk.c (free_gtk_device_struct): + * device-msw.c (mswindows_delete_device): + * device-msw.c (msprinter_delete_device): + * device-x.c (free_x_device_struct): + * device-x.c (x_delete_device): + * dynarr.c (Dynarr_lisp_realloc): + * dynarr.c (Dynarr_free): + * elhash.c: + * elhash.c (finalize_hash_table): + * elhash.c (resize_hash_table): + * elhash.c (pdump_reorganize_hash_table): + * extents.c (gap_array_delete_marker): + * frame-gtk.c (gtk_delete_frame): + * frame-msw.c (mswindows_delete_frame): + * frame-x.c (x_delete_frame): + * glyphs.c (check_for_ignored_expose): + * mc-alloc.c (mc_realloc_1): + * mc-alloc.h: + * objects-tty.c (tty_finalize_color_instance): + * objects-tty.c (tty_finalize_font_instance): + * objects-tty.c (console_type_create_objects_tty): + * syntax.c: + * syntax.c (uninit_buffer_syntax_cache): + * vdb.c (Ftest_vdb): Remove all calls to mc_free. + +2006-12-29 Nix + + * gc.c (recompute_need_to_garbage_collect): Avoid numeric + overflow in percentage calculation. + +2007-08-04 Stephen J. Turnbull + + * sunpro.c (Fut_log_text): Fix mismatched parentheses, reorganize. + Thanks to Paul Keusemann (for a suggested patch) and Rob McMahon + for reporting the issue. + +2007-08-08 Aidan Kehoe + + * eval.c (Feval): Fix, stick with original error messages instead + of referring to the indirected function. + + From Sebastian Freundt's mail + nhtfy9sitjf.fsf@muck.math.tu-berlin.de , Tue Jan 30 12:30:07 UTC + 2007; complements 18005.16378.980760.860724@parhasard.net . + + This reverts the error message when M-: (no-such-function t) RET + is called to the old "Symbol's function definition is void: ..." + rather than the recent "Invalid function: # + + * file-coding.c (undecided_convert): Kludge to prevent infinite + recursion. + * file-coding.c (detected_coding_system): Change default from + raw-text to binary. + +2007-08-04 Aidan Kehoe + + * charset.h: + * charset.h (enum unicode_type): + Add UNICODE_UTF_32. + * lisp.h: + Add Qutf_32. + * lread.c (read_unicode_escape): + Error on an invalid Unicode escape; error on no mapping, as GNU does. + + * mule-coding.c: + * mule-coding.c (dynarr_add_2022_one_dimension): + * mule-coding.c (dynarr_add_2022_two_dimensions): + * mule-coding.c (struct iso2022_coding_stream): + * mule-coding.c (decode_unicode_char): + * mule-coding.c (indicate_invalid_utf_8): + * mule-coding.c (iso2022_decode): + * unicode.c: + * unicode.c (struct unicode_coding_stream): + * unicode.c (decode_unicode_char): + * unicode.c (DECODE_ERROR_OCTET): + * unicode.c (indicate_invalid_utf_8): + * unicode.c (encode_unicode_char_1): + * unicode.c (encode_unicode_char): + * unicode.c (unicode_convert): + * unicode.c (unicode_putprop): + * unicode.c (unicode_getprop): + * unicode.c (syms_of_unicode): + Make UTF-8 and UTF-16 handling more robust; indicate error + sequences when decoding, passing the octets as distinct from the + corresponding ISO8859-1 characters, and (by default) writing them + to disk on encoding. Don't accept over-long UTF-8 sequences, codes + >= #x110000, or UTF-16 surrogates on reading in the utf-8 coding + system; represent them as error sequences. + + Do accept code points above #x110000 in the ISO IR 196 handling, + since we decode Unicode error sequences to "Unicode" code points + starting at 0x200000, and will need to save them as such in + escape-quoted. Do not accept over-long UTF-8 sequences or UTF-16 + surrogates in escape-quoted. + + This change means that when a non-UTF-8 file is opened as UTF-8, + one change made, and immediately saved, the non-ASCII characters + are not corrupted. In Europe, this is a distinct win. + + Add UCS-4, UTF-32 as coding systems. + +2007-07-26 Aidan Kehoe + + * mule-ccl.c (ccl_driver): + op is an integer, not a Lisp_Object; don't use it to temporarily + store a Lisp_Object. This change fixes the union build; thank you + for the report, Robert Delius Royar. + +2007-07-23 Aidan Kehoe + + * text.c: + Backslash a parenthesis at the start of a line, for the sake of + our font lock engine. + +2007-07-21 Aidan Kehoe + + * elhash.c (struct Lisp_Hash_Table): + * elhash.c (HTENTRY_CLEAR_P): + * elhash.c (find_htentry): + * elhash.h: + * elhash.h (htentry): + Move struct Lisp_Hash_Table, HTENTRY_CLEAR_P, struct htentry to + elhash.h, since mule-ccl.c needs to use them. Ditto adding a + declaration for find_htentry to elhash.h, and removing the static + from its declaration in elhash.c + + * file-coding.c: + Add a backslash at the beginning of a line starting with a + parenthesis, for the sake of our font lock engine. + + * mule-ccl.c: + * mule-ccl.c (CCL_LookupIntConstTbl): + * mule-ccl.c (CCL_WRITE_STRING): + * mule-ccl.c (POSSIBLE_LEADING_BYTE_P): + Fix a bug where the charset ID of ASCII was not recognised as + being a possible leading byte. + * mule-ccl.c (CCL_MAKE_CHAR): + Take Mule character arguments in the same format as GNU. + * mule-ccl.c (CCL_DEBUG): + * mule-ccl.c (ccl_driver): + * mule-ccl.c (resolve_symbol_ccl_program): + * mule-ccl.c (Fccl_execute): + * mule-ccl.c (vars_of_mule_ccl): + Add Dave Love's hash table lookup CCL code, which has been in GNU + for years. + + Move mule-to-unicode to accept its argument in the same format as + write-multibyte-character. + + Move to accepting characters as well as integers in lots of + places; with XEmacs (and even with GNU Emacs), where the + character-integer map is not constant from one invocation to the + next, it makes sense for CCL programs with character literals to + accept those literals as characters, not integers. + + If we're a debug build, allow access to ccl-program-table from + Lisp, which can make debugging things easier. + + Take out font-ccl-encoder-alist, since it was never implemented, + and was not ever a stellar idea. + + Provide translation-hash-table-vector, as in GNU. + +2007-06-23 Stephen J. Turnbull + + * event-unixoid.c (event_stream_unixoid_create_io_streams): + * process-unix.c (unix_init_process_io_handles): + Cast out bogus warnings about 64-bit value truncation. + +2007-06-23 Stephen J. Turnbull + + * linuxplay.c (linux_play_data_or_file): More 64-bit tweaking, and + a typo fix. + +2007-06-23 Stephen J. Turnbull + + * sysdep.h (environ): Needs to be in C_DECLS for C++ build. + +2007-06-23 Stephen J. Turnbull + + * compiler.h: Try to use USED with more compilers. Thanks, Jerry! + +2007-06-22 Aidan Kehoe + + * eval.c (restore_int): + * eval.c (record_unwind_protect_restoring_int): + Conditionalise the munging of a C integer into a void pointer on + whether it's necessary at compile time, using INT_VALBITS (which + describes how many value bits a Lisp integer has) and INTBITS + (describing how many value bits a C integer has). + +2007-05-24 Aidan Kehoe + + * eval.c (Feval): + Small optimisations from Sebastian Freundt's SXEmacs work; don't + do the unnecessary book-keeping in the trivial cases, only look + for an indirect function if the stored function is a bound + symbol. + +2007-05-24 Aidan Kehoe + + * free-hook.c (check_free): + * lisp.h: + * lisp.h (xfree): + Inspired by some of Sebastian Freundt's SXEmacs work, use a 64-bit + constant on 64-bit platforms when making sure pointers haven't + been freed twice. + +2007-05-22 Ville Skyttä + + * Makefile.in.in ($(LISP)/finder-inf.el): Set lisp-directory + to $(LISP) to ensure we're working with the correct finder*. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. @@ -8,7 +1037,7 @@ * abbrev.c (write_abbrev): Losely ported from GNU Emacs. * abbrev.c (describe_abbrev): Ditto. * abbrev.c (Finsert_abbrev_table_description): Ditto. - + 2007-05-03 Vin Shelton * dumper.c (pdump): Don't close an already-closed file @@ -28,19 +1057,19 @@ * unicode.c: * unicode.c (encode_unicode_char_1): * unicode.c (unicode_convert): - Support non-BMP characters in UTF-16. + Support non-BMP characters in UTF-16. 2007-05-12 Aidan Kehoe * event-Xt.c (x_reset_modifier_mapping): * event-gtk.c (gtk_reset_modifier_mapping): Zero out the device's modifier map once we've freed it, to prevent - a double free on a re-entrant call. + a double free on a re-entrant call. 2007-05-01 Stephen J. Turnbull * font-mgr.c (Qfontsetp): Remove unused declaration. - + * font-mgr.c (xft-version): Make it a DEFVAR_CONST_INT. * font-mgr.c (fc-version): New: fontconfig.h version. @@ -52,7 +1081,7 @@ * faces.c (complex_vars_of_faces): New symbol and corresponding specifier tag, x-coverage-instantiator, used to group those fonts used for their - extensive coverage for obscure characters in x-faces.el. + extensive coverage for obscure characters in x-faces.el. 2007-04-16 Stephen J. Turnbull @@ -102,7 +1131,7 @@ * font-mgr.c (Ffc_init): * font-mgr.c (Ffc_init_reinitialize): Implemented operations. - + * font-mgr.c (Ffc_config_destroy): * font-mgr.c (Ffc_config_get_blanks): Stub operations. @@ -210,13 +1239,13 @@ * specifier.c (setup_device_initial_specifier_tags): Fix a bug where the mswindows specifier tag was matching X11 devices, because the format of the DEVICE_USER_SPECIFIED_TAGS list - wasn't being respected correctly. + wasn't being respected correctly. 2007-02-06 Aidan Kehoe * mule-charset.c (complex_vars_of_mule_charset): iso8859-2 is not the X11 charset registry for the iso8859-4 - charset, my mistake. + charset, my mistake. 2007-02-05 Mike Sperber @@ -232,10 +1261,10 @@ * eval.c: Document in more detail what happens with byte-compilation, - `function', and `quote'. + `function', and `quote'. * fns.c: Mention that `require' is evaluated both at byte-compile time and - at runtime. + at runtime. 2007-01-06 Vin Shelton @@ -247,19 +1276,19 @@ Update the make-coding-system docstring to reflect unicode-type * general-slots.h: New symbol, unicode-type, since 'type was being overridden when - accessing a coding system's Unicode subtype. + accessing a coding system's Unicode subtype. * intl-win32.c: - Backslash a few parentheses, to help fontification along. + Backslash a few parentheses, to help fontification along. * intl-win32.c (complex_vars_of_intl_win32): Use the 'unicode-type symbol, not 'type, when creating the - Microsoft Unicode coding system. + Microsoft Unicode coding system. * unicode.c (unicode_putprop): * unicode.c (unicode_getprop): * unicode.c (unicode_print): Using 'type as the property name when working out what Unicode subtype a given coding system is was broken, since there's a general coding system property called 'type. Change the former to - use 'unicode-type instead. + use 'unicode-type instead. 2006-12-27 Malcolm Purvis @@ -269,7 +1298,7 @@ 2006-12-17 Aidan Kehoe * faces.c (complex_vars_of_faces): - Don't use server-side fallbacks when building with XFT support. + Don't use server-side fallbacks when building with XFT support. 2006-12-06 Dr. Volker Zell @@ -277,30 +1306,30 @@ * database.c: Only use u_int*_t typedefs if not already defined. -2006-12-08 Aidan Kehoe - - * specifier.c (charset_matches_specifier_tag_set_p): - A charset's entry in Vcharset_tag_lists may be nil, if, when that - charset was created, no tags with associated charset predicates - existed. Accept this possibility, treat it as the tag not matching - that charset. +2006-12-08 Aidan Kehoe + + * specifier.c (charset_matches_specifier_tag_set_p): + A charset's entry in Vcharset_tag_lists may be nil, if, when that + charset was created, no tags with associated charset predicates + existed. Accept this possibility, treat it as the tag not matching + that charset. 2006-12-11 Aidan Kehoe - * event-tty.c: - * event-tty.c (emacs_tty_event_pending_p): - * event-tty.c (reinit_vars_of_event_tty): - Pay attention to the dispatch event queue, and input pending - signals in emacs_tty_event_pending_p. Makes pure TTY builds more - responsive. + * event-tty.c: + * event-tty.c (emacs_tty_event_pending_p): + * event-tty.c (reinit_vars_of_event_tty): + Pay attention to the dispatch event queue, and input pending + signals in emacs_tty_event_pending_p. Makes pure TTY builds more + responsive. 2006-12-11 Aidan Kehoe - * glyphs-eimage.c (png_warning_func): - * glyphs-eimage.c (png_instantiate): - * glyphs-eimage.c (tiff_warning_func): - Decode external binary data as such before passing it to - warn_when_safe(). + * glyphs-eimage.c (png_warning_func): + * glyphs-eimage.c (png_instantiate): + * glyphs-eimage.c (tiff_warning_func): + Decode external binary data as such before passing it to + warn_when_safe(). 2006-12-09 Vin Shelton @@ -326,7 +1355,7 @@ * text.c (Fsplit_char): Make split-char available on non-Mule builds, taking out a - superfluous call to get-charset to make that possible. + superfluous call to get-charset to make that possible. 2006-11-30 Mike Sperber @@ -345,14 +1374,14 @@ Add an optional argument FORCE, to allow specifying badly-formed CHARSET_REGISTRY-CHARSET_ENCODING combinations. Re-enables the sort of hacks described in 96wt67fa3f.fsf@mo.msk.ru from Ilya - Golubev. + Golubev. 2006-11-29 Aidan Kehoe * sound.c (init_native_sound): Only X11 and GTK devices can possibly not be on the console of the associated machine. Fixes a crash when init_native_sound is called - on a msprinter device. + on a msprinter device. 2006-11-28 Aidan Kehoe @@ -360,23 +1389,23 @@ * device-x.c (coding_system_of_xrm_database): Cache the last db argument and resulting coding system, and return them--instead of calling Lisp--if the DB is the same pointer - arument as last time. + arument as last time. * faces.c (default_face_font_info): * window.c (window_displayed_height): Behave more gracefully if called when we have no information about - the dimensions of the default face and window. + the dimensions of the default face and window. 2006-11-28 Aidan Kehoe * doprnt.c (emacs_doprnt_1): - Ibyte -> Ascbyte, for the sake of the MSVC build. Thank you Vin. + Ibyte -> Ascbyte, for the sake of the MSVC build. Thank you Vin. 2006-11-28 Aidan Kehoe * doprnt.c (emacs_doprnt_1): Integrate Sebastian Freundt's SXEmacs bug fix for cases where a format specifier overflows the allocated buffer with a float - format string. + format string. 2006-11-23 Robert Pluim @@ -387,7 +1416,7 @@ * mule-coding.c (iso2022_decode): Only take the lower seven bits of any eight-bit character that - would be illegal in UTF-8, when handling ISO/IR 196 escapes. + would be illegal in UTF-8, when handling ISO/IR 196 escapes. 2006-11-14 Stephen J. Turnbull @@ -419,34 +1448,34 @@ * mule-charset.c: * mule-charset.c (Fcharsets_in_region): - Added a charsets-in-region implementation in C. + Added a charsets-in-region implementation in C. 2006-11-14 Aidan Kehoe * objects-xlike-inc.c (x_find_charset_font): Move the warn_when_safe call to where GCing is irrelevant; as things are it doesn't GC, but I'm more comfortable without that - being relevant. + being relevant. * specifier.c (define_specifier_tag): Remove a couple of lines added for the sake of debugging; add a GCPRO1 for the allocated vector, since the call_trapping_problems - can GC. + can GC. 2006-11-12 Aidan Kehoe * charset.h: * mule-charset.c (set_charset_registries): Provide a C-accessible version of set-charset-registries that - doesn't error. Called from x_find_charset_font. + doesn't error. Called from x_find_charset_font. * faces.c (ensure_face_cachel_contains_charset): - Correct my spelling. - + Correct my spelling. + * faces.c (update_EmacsFrame): - Don't update the frame if it isn't live. - + Don't update the frame if it isn't live. + * faces.h: - Add some documentation on FACE_FONT. + Add some documentation on FACE_FONT. * frame-gtk.c (gtk_update_frame_external_traits): * frame-x.c (x_update_frame_external_traits): @@ -458,7 +1487,7 @@ * mule-charset.c (Fset_charset_registries): Don't allow XLFD wildcards in charset registries. Call the factored-out C-callable version instead of implementing the guts - of the function here. + of the function here. * objects-gtk.c: #include "charset.h" @@ -467,17 +1496,17 @@ gtk_find_charset_font): In the event that the charset is ASCII and we haven't matched anything up to now, even with a pattern of "*", add "iso8859-1" to the charset's registry and try again. - + * window.c (window_pixel_width_to_char_width): The default width of a face may be zero; only divide by it if it's - nonzero. - + nonzero. + 2006-11-11 Aidan Kehoe * specifier.c: Update the specifier-matching-instance documentation to reflect - the new format of font-specifier MATCHSPECs. - + the new format of font-specifier MATCHSPECs. + 2006-11-11 Aidan Kehoe * specifier.c: @@ -489,154 +1518,154 @@ * specifier.c (specifier_instance_from_inst_list): Accept symbols as well as charset objects as the cons of a - font-related specifier matchspec. Thank you Ilya. - + font-related specifier matchspec. Thank you Ilya. + 2006-11-07 Aidan Kehoe * mule-charset.c: Take the Qfinal declaration out of mule-charset.c; fixes the MSVC build. Sorry Vin! - + 2006-11-06 Aidan Kehoe * mule-charset.c (Fmake_charset): * objects-msw.c (mswindows_font_spec_matches_charset): * specifier.c (syms_of_specifier): Three changes to prevent the build dying with MSVC and with - DEBUG_XEMACS turned off--thank you Vin. - + DEBUG_XEMACS turned off--thank you Vin. + 2006-11-05 Aidan Kehoe - * charset.h: - Prefer the charset-registries property to the charset-registry - property; accept the latter for compatibility, warning when its - regexp functionality is used. - - * charset.h (XCHARSET_CCL_PROGRAM): - * charset.h (XCHARSET_NAME): - Make dummy versions of these available in non-Mule. - - * console-impl.h: - * console-impl.h (struct console_methods): - Rename the last parameter to a couple of methods; reformat their - declarations. - - * faces.c: - * faces.c (face_property_matching_instance): - * faces.c (ensure_face_cachel_contains_charset): - * faces.c (merge_face_cachel_data): - * faces.c (reset_face_cachel): - * faces.c (mark_face_cachels_as_not_updated): - * faces.c (syms_of_faces): - * faces.c (vars_of_faces): - * faces.c (complex_vars_of_faces): - Provide a DEBUG_FACES macro; use it to make debugging output - available in debug builds. - Implement multi-stage font lookup, assigning the stages names, not - numbers. - Re-implement the cachel->font_specified cache using the - infrastructure for Lisp bit vectors. - - * faces.h: - * faces.h (struct face_cachel): - * faces.h (FACE_CACHEL_FONT_UPDATED): - * faces.h (FACE_FONT): - Re-implement the cachel->font_specified cache using the - infrastructure for Lisp bit vectors. - - * font-mgr.h: - Move some XFT debug macros here from objects-x.c. - - * general-slots.h: - Provide a few new symbols for the multi-stage font resolution - process. - - * intl.c (init_intl): - Correct a comment. - - * lisp.h: - Provide a macro to declare an inline lisp bit vector where the - size is fixed. - Make Qregistries available all over, not Qregistry. - - * mule-charset.c: - * mule-charset.c (mark_charset): - * mule-charset.c (print_charset): - * mule-charset.c (make_charset): - * mule-charset.c (Fmake_charset): - * mule-charset.c (Fcharset_property): - * mule-charset.c (Fset_charset_ccl_program): - * mule-charset.c (syms_of_mule_charset): - * mule-charset.c (complex_vars_of_mule_charset): - * mule-charset.c (CHINESE_CNS_PLANE): - Prefer the charset-registries property to the charset-registry - property; accept the latter for compatibility, warning when its - regexp functionality is used. - - * objects-gtk.c: - * objects-gtk.c (gtk_font_spec_matches_charset): - * objects-gtk.c (gtk_find_charset_font): - * objects-msw.c (mswindows_find_charset_font): - * objects-tty.c (tty_find_charset_font): - Redeclare various functions to work with the multi-stage lookup + * charset.h: + Prefer the charset-registries property to the charset-registry + property; accept the latter for compatibility, warning when its + regexp functionality is used. + + * charset.h (XCHARSET_CCL_PROGRAM): + * charset.h (XCHARSET_NAME): + Make dummy versions of these available in non-Mule. + + * console-impl.h: + * console-impl.h (struct console_methods): + Rename the last parameter to a couple of methods; reformat their + declarations. + + * faces.c: + * faces.c (face_property_matching_instance): + * faces.c (ensure_face_cachel_contains_charset): + * faces.c (merge_face_cachel_data): + * faces.c (reset_face_cachel): + * faces.c (mark_face_cachels_as_not_updated): + * faces.c (syms_of_faces): + * faces.c (vars_of_faces): + * faces.c (complex_vars_of_faces): + Provide a DEBUG_FACES macro; use it to make debugging output + available in debug builds. + Implement multi-stage font lookup, assigning the stages names, not + numbers. + Re-implement the cachel->font_specified cache using the + infrastructure for Lisp bit vectors. + + * faces.h: + * faces.h (struct face_cachel): + * faces.h (FACE_CACHEL_FONT_UPDATED): + * faces.h (FACE_FONT): + Re-implement the cachel->font_specified cache using the + infrastructure for Lisp bit vectors. + + * font-mgr.h: + Move some XFT debug macros here from objects-x.c. + + * general-slots.h: + Provide a few new symbols for the multi-stage font resolution + process. + + * intl.c (init_intl): + Correct a comment. + + * lisp.h: + Provide a macro to declare an inline lisp bit vector where the + size is fixed. + Make Qregistries available all over, not Qregistry. + + * mule-charset.c: + * mule-charset.c (mark_charset): + * mule-charset.c (print_charset): + * mule-charset.c (make_charset): + * mule-charset.c (Fmake_charset): + * mule-charset.c (Fcharset_property): + * mule-charset.c (Fset_charset_ccl_program): + * mule-charset.c (syms_of_mule_charset): + * mule-charset.c (complex_vars_of_mule_charset): + * mule-charset.c (CHINESE_CNS_PLANE): + Prefer the charset-registries property to the charset-registry + property; accept the latter for compatibility, warning when its + regexp functionality is used. + + * objects-gtk.c: + * objects-gtk.c (gtk_font_spec_matches_charset): + * objects-gtk.c (gtk_find_charset_font): + * objects-msw.c (mswindows_find_charset_font): + * objects-tty.c (tty_find_charset_font): + Redeclare various functions to work with the multi-stage lookup process. Include objects-xlike-inc. - - * objects-x.c: - Provide a DEBUG_OBJECTS macro; use it to make debugging output - available in debug builds. - - * objects-x.c (x_initialize_font_instance): - * objects-x.c (x_print_font_instance): - * objects-x.c (xlistfonts_checking_charset): - * objects-x.c (vars_of_objects_x): - Don't regex match on the output of XListFonts; instead, use the - fixed strings of the charset-registries to comparatively limit the + + * objects-x.c: + Provide a DEBUG_OBJECTS macro; use it to make debugging output + available in debug builds. + + * objects-x.c (x_initialize_font_instance): + * objects-x.c (x_print_font_instance): + * objects-x.c (xlistfonts_checking_charset): + * objects-x.c (vars_of_objects_x): + Don't regex match on the output of XListFonts; instead, use the + fixed strings of the charset-registries to comparatively limit the IPC that will happen. Include objects-xlike-inc.c - + * objects-xlike-inc.c: * objects-xlike-inc.c (count_hyphens): - New. How many ASCII minus characters in a string? + New. How many ASCII minus characters in a string? * objects-xlike-inc.c (xlistfonts_checking_charset): * objects-xlike-inc.c (mule_to_fc_charset): * objects-xlike-inc.c (xft_find_charset_font): - * objects-x.c (x_find_charset_font): - Move some methods here to share them with GTK. - - * objects.c (print_font_instance): - * objects.c (font_spec_matches_charset): - * objects.c (font_validate_matchspec): - * objects.c (font_instantiate): - Redeclare some methods to take enums rather than numeric stages. - - * objects.h (EXFUN): - Make Fregexp_quote available to mule-charset.c - - * redisplay-x.c: - * redisplay-x.c (separate_textual_runs): - Make this slightly faster, cleaner. Make it accept a face cachel - pointer argument, and check it as to whether a given charset - should be translated to UCS-2 before redisplay. - - * specifier.c: - * specifier.c (charset_matches_specifier_tag_set_p): - * specifier.c (define_specifier_tag): - * specifier.c (Fdefine_specifier_tag): - * specifier.c (setup_device_initial_specifier_tags): - * specifier.c (setup_charset_initial_specifier_tags): - * specifier.c (specifier_instance_from_inst_list): - * specifier.c (syms_of_specifier): - * specifier.c (vars_of_specifier): - * specifier.h: - Extend specifiers to allow limiting their applicability by using - charset predicates. Document this. - Run indent-region on the file, at Stephen's suggestion. - - * unicode.c (unicode_to_ichar): - * unicode.c (syms_of_unicode): - * unicode.c (vars_of_unicode): - Use unicode-registries, a dumped vector, as the charset-registries - of the on-the-fly JIT charsets. + * objects-x.c (x_find_charset_font): + Move some methods here to share them with GTK. + + * objects.c (print_font_instance): + * objects.c (font_spec_matches_charset): + * objects.c (font_validate_matchspec): + * objects.c (font_instantiate): + Redeclare some methods to take enums rather than numeric stages. + + * objects.h (EXFUN): + Make Fregexp_quote available to mule-charset.c + + * redisplay-x.c: + * redisplay-x.c (separate_textual_runs): + Make this slightly faster, cleaner. Make it accept a face cachel + pointer argument, and check it as to whether a given charset + should be translated to UCS-2 before redisplay. + + * specifier.c: + * specifier.c (charset_matches_specifier_tag_set_p): + * specifier.c (define_specifier_tag): + * specifier.c (Fdefine_specifier_tag): + * specifier.c (setup_device_initial_specifier_tags): + * specifier.c (setup_charset_initial_specifier_tags): + * specifier.c (specifier_instance_from_inst_list): + * specifier.c (syms_of_specifier): + * specifier.c (vars_of_specifier): + * specifier.h: + Extend specifiers to allow limiting their applicability by using + charset predicates. Document this. + Run indent-region on the file, at Stephen's suggestion. + + * unicode.c (unicode_to_ichar): + * unicode.c (syms_of_unicode): + * unicode.c (vars_of_unicode): + Use unicode-registries, a dumped vector, as the charset-registries + of the on-the-fly JIT charsets. 2006-11-01 Adrian Aichner @@ -662,13 +1691,13 @@ * event-xlike-inc.c: Rework the X11 keysym support to allow the use of Cyrillic keysyms that are not in ISO-8859-5. - + 2006-10-27 Aidan Kehoe * fileio.c (Finsert_file_contents_internal) : Clarify that we follow a more correct but more expensive design for buffers where the on-disk representation doesn't correspond directly to the - XEmacs internal representation. + XEmacs internal representation. 2006-08-29 Stephen J. Turnbull @@ -686,14 +1715,14 @@ New flag; multiple_width, specifying whether East Asian characters take up two columns on this terminal. The macro to access it expands to a constant under non-Mule, so anything conditionalising - on it will be optimised away. + on it will be optimised away. * console-tty.c: * console-tty.c (tty_init_console): Initialise tty_con->multiple_width; zero on non-Mule, one on Mule. * console-tty.c (Fconsole_tty_multiple_width): New. - * console-tty.c (Fset_console_tty_multiple_width): New. + * console-tty.c (Fset_console_tty_multiple_width): New. * console-tty.c (syms_of_console_tty): Make them available outside console-tty.c. @@ -701,19 +1730,19 @@ * redisplay-tty.c (tty_output_ibyte_string): Check that the relevant console has multiple-width characters before using something other than the number of characters in a - string for the text width of that string. + string for the text width of that string. * text.c: * text.c (ibyte_string_displayed_columns): * text.c (ichar_string_displayed_columns): - Remove some Mule conditionals; add some sanity-checking. - + Remove some Mule conditionals; add some sanity-checking. + 2006-08-23 Aidan Kehoe * syntax.c (complex_vars_of_syntax): Guillemets are now punctuation, not parentheses. AucTeX does this, and it's infinitely less annoying if you're dealing with German - text or mixed German and French. + text or mixed German and French. 2006-08-03 Jerry James @@ -725,26 +1754,26 @@ * doc.c (Fsnarf_documentation): Add an assertion and a comment, rather than crashing in the 76584th call of hash_string when someone's using a DOC file that - doesn't conform to format. - + doesn't conform to format. + 2006-08-05 Aidan Kehoe * syntax.c (complex_vars_of_syntax): String literals are char[], not unsigned char[]. Cast them when - passing to a function that takes UExtbyte *. - + passing to a function that takes UExtbyte *. + 2006-08-05 Aidan Kehoe * lread.c (read_unicode_escape): Refactor this code out from read_escape, since it's now called - from read_string as well. + from read_string as well. * lread.c (read_escape): - Call read_unicode_escape instead of using inline code, + Call read_unicode_escape instead of using inline code, * lread.c (read_string): - Refactor out from read1, provide raw and honor_unicode options. + Refactor out from read1, provide raw and honor_unicode options. * lread.c (read_raw_string): Added, a function that calls read_string with the correct - arguments for a raw string. + arguments for a raw string. * lread.c (read1): Pass raw strings to read_raw_string; pass strings to read_string. @@ -758,7 +1787,7 @@ 2006-08-04 Aidan Kehoe * syntax.c (Fsyntax_table_p): - Make the docstring better reflect the code. + Make the docstring better reflect the code. * syntax.c (define_standard_syntax): Take a const UExtbyte * as the first argument, not a const char * @@ -793,7 +1822,7 @@ * redisplay.c (add_octal_runes): * syntax.h: * text.c - Change some comments to reflect a 21-bit character space. + Change some comments to reflect a 21-bit character space. * text.c (non_ascii_valid_ichar_p): Check that no character value is greater than 2^^21, not 2^^19. This fixes the Mule build when error-checking is turned on. @@ -905,8 +1934,8 @@ * event-xlike-inc.c: Add support for three publishing keysyms with clear Unicode mappings. They would have been included in my commit of 2005-06-26 - had Markus Kuhn known about them. - + had Markus Kuhn known about them. + 2006-06-13 Jerry James * lisp-union.h: Cast away bit restrictions on values retrieved @@ -916,11 +1945,11 @@ * mule-ccl.c: Don't declare ccl-program as a symbol here, leave that to - general-slots.h. + general-slots.h. * unicode.c (unicode_to_ichar): Use qxesprintf, not snprintf, change some types to allow - complilation on Win32. - + complilation on Win32. + 2006-06-03 Aidan Kehoe * charset.h: @@ -935,78 +1964,78 @@ Make enum unicode_type, encode_unicode_char and Funicode_to_char available outside of unicode.c - + * lread.c: * event-xlike-inc.c: Use the charset.h declaration of Funicode_to_char, don't declare - it ourselves. + it ourselves. My XFree86 installation has taken to passing me ASCII characters - using the Unicode keysyms; accept them too. - + using the Unicode keysyms; accept them too. + * general-slots.h: Make `ccl-program' and `encode-as-utf-8' available as symbols - generally. + generally. * mule-ccl.c: Add CCL_MuleToUnicode, CCL_UnicodeToMule, implement them, enable and debug CCL_MAKE_CHAR, have CCL_WriteMultibyteChar2 segfault - less, fix some grammar. + less, fix some grammar. * mule-charset.c (make_charset): * mule-charset.c (Fmake_charset): * mule-charset.c (Fcharset_property): * mule-charset.c (complex_vars_of_mule_charset): Require the encode_as_utf_8 property when calling make_charset (); - accept it when creating a charset from Lisp in Fmake_charset. + accept it when creating a charset from Lisp in Fmake_charset. * mule-coding.c: * mule-coding.c (dynarr_add_2022_one_dimension): * mule-coding.c (dynarr_add_2022_two_dimensions): Add two convenience functions for iso2022_decode, to abstract out - writing UTF-8 a little. - + writing UTF-8 a little. + * mule-coding.c (enum iso_esc_flag): - Add one more state to reflect the existence of the UTF-8 escape. + Add one more state to reflect the existence of the UTF-8 escape. * mule-coding.c (struct iso2022_coding_stream): Add a counter variable to the state to permit handling - variable-length UTF-8. - + variable-length UTF-8. + * mule-coding.c (parse_iso2022_esc): Update the function to work with ISO_STATE_UTF_8; only the ESC % @ escape is processed in that state, everything else is ignored and - passed through by the error handler. - + passed through by the error handler. + * mule-coding.c (iso2022_decode): * mule-coding.c (iso2022_designate): * mule-coding.c (iso2022_encode): Handle the UTF-8 escape sequences in reading and in writing ISO - 2022. - + 2022. + * redisplay-x.c (separate_textual_runs): Add a comment to the effect that the dimension stuff breaks when - using CCL programs and registries to map to a bigger charset. - + using CCL programs and registries to map to a bigger charset. + * unicode.c: Add support for creating new characters on the fly as unknown - Unicode code points are encountered. + Unicode code points are encountered. * unicode.c (get_free_codepoint): New. * unicode.c (unicode_to_ichar): Reworked to create new code points - on the fly. - * unicode.c (Funicode_to_char): Update the docstring. + on the fly. + * unicode.c (Funicode_to_char): Update the docstring. * unicode.c (struct unicode_coding_system): - Move enum unicode_type into charset.h. + Move enum unicode_type into charset.h. * unicode.c (encode_unicode_char): encode_unicode_char isn't static any longer, mule-coding.c uses - it. + it. * unicode.c (syms_of_unicode): Make a couple of symbols available to unicode.c * unicode.c (vars_of_unicode): Tell the garbage collector about current_jit_charset, initialise - it. + it. 2006-05-25 Stephen J. Turnbull @@ -1028,8 +2057,8 @@ 2006-05-23 Aidan Kehoe * file-coding.c (output_bytes_in_ascii_and_hex): - Fix a Win32 build failure introduced by my last commit. - + Fix a Win32 build failure introduced by my last commit. + 2006-05-23 Stephen J. Turnbull * .gdbinit.in: Moved to etc. @@ -1045,13 +2074,13 @@ * frame-x.c (x_set_frame_properties): Check that the frame is live and that the device is not being deleted before attempting anything. Avoids calling X code if - x_IO_error_handler has seen a broken pipe. - + x_IO_error_handler has seen a broken pipe. + 2006-05-22 Aidan Kehoe * file-coding.c (output_bytes_in_ascii_and_hex): Pass stderr_out internally-formatted data, don't use an external - format. + format. 2006-05-21 Aidan Kehoe @@ -1062,7 +2091,7 @@ ten years at least, but it was Fabrice Popineau's investigation of the code on the same model in extract_object_file_name that provoked its discovery. Thank you Fabrice! - + 2006-05-16 Stephen J. Turnbull * XEmacs 21.5.27 "fiddleheads" is released. @@ -1125,27 +2154,27 @@ 2006-05-06 Aidan Kehoe * lisp.h (struct Lisp_Subr): - Document that prompt, doc, and name should not be char *. + Document that prompt, doc, and name should not be char *. * symbols.c (Fsubr_name): - Cast name to const Ibyte * before returning it. + Cast name to const Ibyte * before returning it. * sysfile.h: Make versions of DIRECTORY_SEP, IS_DIRECTORY_SEP and IS_ANY_SEP - available to make-docfile and other non-emacs processes on win32. - + available to make-docfile and other non-emacs processes on win32. + 2006-04-30 Stephen J. Turnbull * font-mgr.c (string_list_to_fcobjectset): Remove debugging output. 2006-04-29 Aidan Kehoe - * symbols.c (Fsubr_name): New. + * symbols.c (Fsubr_name): New. Taken from the FSF. Needed to find the real name of a possibly aliased subr, in order to get its docstring. * sysfile.h: Make various file name primitives available to make-docfile and other non-emacs environments; define a constant that says how long - a source filename can be in lib-src/DOC. - + a source filename can be in lib-src/DOC. + 2006-04-29 Aidan Kehoe * doc.c: @@ -1153,15 +2182,15 @@ * doc.c (get_object_file_name): * doc.c (Fbuilt_in_symbol_file): Support saving and recovering the source file name of a built-in - symbol (that is, one created in C.) - + symbol (that is, one created in C.) + 2006-04-29 Aidan Kehoe * lread.c: * lread.c (read_escape): Support \uABCD and \U00ABCDEF for specifying characters by their - Unicode code point. - + Unicode code point. + 2006-04-25 Stephen J. Turnbull Repair busted commit, plus some gratuitous doc improvements. @@ -1192,8 +2221,8 @@ * data.c (Flistp): Take on board feedback from Stephen on my last change; move the explanation of what a cons is to the cons docstring, add cross - references to that from the consp and atomp docstrings. - + references to that from the consp and atomp docstrings. + 2006-04-23 Stephen J. Turnbull * Makefile.in.in (x_objs): Change xft-fonts.o to font-mgr.o. @@ -1249,10 +2278,10 @@ Short docstring clarifications to make life easier for people who are learning Lisp; explain what a cons is in the consp docstring, what a symbol is in the symbolp docstring, and so forth. Thank you - Alan Mackenzie on emacs-devel. + Alan Mackenzie on emacs-devel. Expand on "monotonically increasing" and "monotonically decreasing" in the Flss and Fgtr docstrings. - + 2006-04-10 Jerry James * alsaplay.c: Support pre-1.0.10 versions of the ALSA library. @@ -1341,7 +2370,7 @@ 2006-03-20 Marcus Crestani * dynarr.c (Dynarr_realloc): Malloc correct size. - * lisp.h: Dynamic array cleanup, remove duplicate code. + * lisp.h: Dynamic array cleanup, remove duplicate code. 2006-03-17 Stephen J. Turnbull @@ -1367,7 +2396,7 @@ 2006-02-22 Marcus Crestani Asynchronous finalization: - + * Makefile.in.in: Remove mc-alloc, replace with newgc. * alloc.c (alloc_lrecord): Add object that has a finalizer to Vall_finalizable_objs. @@ -1383,7 +2412,7 @@ * gc.c (add_finalizable_object): New. * gc.c (register_for_finalization): New. * gc.c (gc_finalize): Call register_for_finalization. - * gc.c (gc_1): Move kkcc_gc_stack_free after finalization. + * gc.c (gc_1): Move kkcc_gc_stack_free after finalization. * gc.c (common_init_gc_early): Add asynchronous finalization variables. * gc.c (init_gc_early): Add asynchronous finalization variables. @@ -1402,8 +2431,8 @@ * specifier.c (finalize_specifier): Remove unneeded finalizer for NEW_GC. - Merge #ifdef MC_ALLOC into #ifdef NEW_GC, remove no longer needed - MC_ALLOC specific code in all files: + Merge #ifdef MC_ALLOC into #ifdef NEW_GC, remove no longer needed + MC_ALLOC specific code in all files: * alloc.c: * buffer.c: * bytecode.c: @@ -1509,11 +2538,11 @@ * nt.c (init_mswindows_environment): Add EMACSEARLYPACKAGES, EMACSLATEPACKAGES, EMACSLASTPACKAGES. - * config.h.in: + * config.h.in: (PATH_EARLY_PACKAGE_DIRECTORIES, PATH_LATE_PACKAGE_DIRECTORIES) (PATH_LAST_PACKAGE_DIRECTORIES): Add. - * paths.h.in: + * paths.h.in: (PATH_EARLY_PACKAGE_DIRECTORIES, PATH_LATE_PACKAGE_DIRECTORIES) (PATH_LAST_PACKAGE_DIRECTORIES): Add. @@ -1529,37 +2558,37 @@ * alloc.c (MALLOC_BEGIN): * alloc.c (FREE_OR_REALLOC_BEGIN): Revert the alloc warning bugfix, in response to Stephen's mail - 87acepzl6e.fsf@tleepslib.sk.tsukuba.ac.jp . + 87acepzl6e.fsf@tleepslib.sk.tsukuba.ac.jp . 2005-12-24 Aidan Kehoe * objects-x.c (x_font_instance_truename): * objects-x.c (x_find_charset_font): Reintroduce my change of 2005-12-20 and Stephen's of 2005-12-23, - which my last commit overrode. - + which my last commit overrode. + 2005-12-24 Aidan Kehoe * event-Xt.c: - Add two new lisp variables, x-us-keymap-description and + Add two new lisp variables, x-us-keymap-description and x-us-keymap-first-keycode to better provide a fallback to the US layout with keyboards where typing the Roman alphabet and those punctuation symbols that have command bindings associated with them is difficult. - * event-Xt.c (x_event_to_emacs_event): - Use those two Lisp variables to improve Russian C-x processing. - * event-stream.c (command_builder_find_leaf): - Make a comment more readable. + * event-Xt.c (x_event_to_emacs_event): + Use those two Lisp variables to improve Russian C-x processing. + * event-stream.c (command_builder_find_leaf): + Make a comment more readable. 2005-12-24 Aidan Kehoe * alloc.c (MALLOC_BEGIN): Assert that we're either not in malloc, or warning about memory - being low. + being low. * alloc.c (MALLOC_WARNING_BEGIN, MALLOC_WARNING_END): Add two clauses to set and clear a flag that we're in a low-memory - warning situation. - * alloc.c (malloc_warning): + warning situation. + * alloc.c (malloc_warning): Move it after the definition of MALLOC_WARNING_BEGIN, MALLOC_WARNING_END @@ -1567,7 +2596,7 @@ * objects-gtk.c (MAX_FONT_COUNT): * objects-x.c (MAX_FONT_COUNT): Increase MAX_FONT_COUNT from 5000 - to INT_MAX. Applies to both the X and GTK platforms. + to INT_MAX. Applies to both the X and GTK platforms. 2005-12-23 Stephen J. Turnbull @@ -1581,10 +2610,10 @@ 2005-12-20 Aidan Kehoe * objects-x.c (x_find_charset_font): - Return Qnil on no match, not Qunbound. Fixes performance issues - based on the use of this return value in - objects.c:font_instantiate - + Return Qnil on no match, not Qunbound. Fixes performance issues + based on the use of this return value in + objects.c:font_instantiate + 2005-12-18 Aidan Kehoe * syntax.c (charset_syntax): @@ -1592,9 +2621,9 @@ * syntax.c (complex_vars_of_syntax): To my embarrassment, my previous change didn't actually work. This change makes - (char-syntax (make-char 'chinese-cns11643-1 50 50)) + (char-syntax (make-char 'chinese-cns11643-1 50 50)) give ?w, the expected result after the last change. - + 2005-12-18 Stephen J. Turnbull * XEmacs 21.5.24 "dandelion" is released. @@ -1607,14 +2636,14 @@ 2005-12-18 Aidan Kehoe * chartab.c (Fmake_char_table): - Set the default character class to word, not whitespace. - + Set the default character class to word, not whitespace. + 2005-12-17 Aidan Kehoe * buffer.c: standard-syntax-table and standard-category-table are not - available from Lisp any more, don't mention as Lisp variables. - + available from Lisp any more, don't mention as Lisp variables. + 2005-12-17 Aidan Kehoe * console-x.c (x_perhaps_init_unseen_key_defaults): @@ -1626,9 +2655,9 @@ ASCII, or as an octal escape if it's not. Use keyboard-coding-system rather than undecided for decoding the - keysym name passed to us by an input method. + keysym name passed to us by an input method. * file-coding.c (vars_of_file_coding): - Document that keyboard-coding-system is also used for X11. + Document that keyboard-coding-system is also used for X11. 2005-11-29 Marcus Crestani @@ -1658,7 +2687,7 @@ 2005-11-27 Stephen J. Turnbull Build fixes and dead code removal. - + * xft-fonts.c (Ffc_pattern_destroy): Delete. (syms_of_xft_fonts): Delete Ffc_pattern_destroy and comment out Fxft_name_unparse. @@ -1677,7 +2706,7 @@ 2005-11-25 Stephen J. Turnbull * objects-x.c: Improve comments. - + 2005-11-25 Stephen J. Turnbull * xft-fonts.h: @@ -1815,7 +2844,7 @@ 2005-07-31 Daniel Pittman - * xft-fonts.c: Update Ffc_list_fonts_pattern_objects to use the + * xft-fonts.c: Update Ffc_list_fonts_pattern_objects to use the FontConfig API nicely, preventing it from rebuilding the list of available fonts on *every* access. @@ -1958,13 +2987,13 @@ * objects-x.c (CHECKING_LANG): General mule-sanity cleanup for the debug messages, to eliminate the issue Giacomo Boffi saw in - 16970.44359.621213.994821@boffi95.stru.polimi.it. + 16970.44359.621213.994821@boffi95.stru.polimi.it. * objects-x.c (x_find_charset_font): Font names are also treated as UTF-8; relatedly, when passing back the font's full name, the character coverage bitmap isn't included any more, because that would make it an invalid UTF-8 string. - + 2005-03-10 Stephen J. Turnbull * objects-x.c (charset_table): Fix ISO 639 code for Greek. Reported @@ -1981,7 +3010,7 @@ * objects-x-impl.h: Include lwlib-fonts.h - * objects-x.c (x_font_instance_truename): + * objects-x.c (x_font_instance_truename): * glyphs-x.c (update_widget_face): * frame-x.c (x_update_frame_external_traits): Use the correct variant of FONT_INSTANCE_{X,XFT}_FONT. @@ -2104,11 +3133,11 @@ 2005-02-03 Eric Knauel - * lrecord.h (enum lrecord_type): remove lrecord for FcObjectSets - - * xft-fonts.h (struct fc_fontset): remove lrecord for FcObjectSets - - * xft-fonts.c (DEFINE_LRECORD_IMPLEMENTATION): + * lrecord.h (enum lrecord_type): remove lrecord for FcObjectSets + + * xft-fonts.h (struct fc_fontset): remove lrecord for FcObjectSets + + * xft-fonts.c (DEFINE_LRECORD_IMPLEMENTATION): (Ffc_objectset_create, Ffc_objectset_p, Ffc_objectset_add) (Ffc_objectset_destroy): remove lrecord for FcObjectSets (Ffc_list_fonts_pattern_objects): adapt for new representation of @@ -2210,11 +3239,11 @@ Incremental Garbage Collector * .cvsignore: Add .dbxrc and .gdbinit. - + * .dbxrc: Remove. * .dbxrc.in: New, used to generate .dbxrc: If newgc is enabled, do not break on SIGBUS and SIGSEGV. - * .gdbinit: Remove. + * .gdbinit: Remove. * .gdbinit: New, used to generate .gdbinit: If newgc is enabled, do not break on SIGBUS and SIGSEGV. @@ -2235,7 +3264,7 @@ recompute_need_to_garbage_collect. * alloc.c (make_compiled_function): Field arguments is now a Lisp object, thus init it to Qnil rather than NULL. - * alloc.c (struct string_chars_block): + * alloc.c (struct string_chars_block): * alloc.c (finalize_string): * alloc.c (struct string_chars): * alloc.c (make_uninit_string): @@ -2263,7 +3292,7 @@ * bytecode.c (finalize_compiled_function): * bytecode.c (syms_of_bytecode): * bytecode.h: - * bytecode.h (struct compiled_function_args): + * bytecode.h (struct compiled_function_args): * bytecode.h (struct Lisp_Compiled_Function): Add new Lisp object: compiled_function_args. @@ -2413,7 +3442,7 @@ * glyphs.c (register_ignored_expose): * glyphs.c (reinit_vars_of_glyphs): * glyphs.h: - * glyphs.h (struct glyph_cachel): + * glyphs.h (struct glyph_cachel): * glyphs.h (struct expose_ignore): Add new Lisp object: glyph_cachel and expose_ignore. @@ -2428,7 +3457,7 @@ * lrecord.h: Remove lrecord_type numbering. * lrecord.h (enum lrecord_type): Add new Lisp objects. - * lrecord.h (MC_ALLOC_CALL_FINALIZER): Add GC statistics. + * lrecord.h (MC_ALLOC_CALL_FINALIZER): Add GC statistics. * lrecord.h (enum memory_description_type): Add XD_LISP_OBJECT_BLOCK_PTR. * lrecord.h (XD_LISP_DYNARR_DESC): New. @@ -2510,7 +3539,7 @@ * window.c (make_dummy_parent): * window.c (syms_of_window): New Lisp objects: face_cachel, fache_cachel_dynarr, glyph_cachel, and glyph_cachel_dynarr. - + New files: * gc.c: Moved code from alloc.c. Split up garbage_collect_1 in a @@ -2567,7 +3596,7 @@ * window.c (change_window_height): Have change_window_height change the window width when requested to do so; fixes bugs and - error messages with VM, BBDB. + error messages with VM, BBDB. 2005-11-16 Stephen J. Turnbull @@ -2599,15 +3628,15 @@ set_lheader_implementation() -- that way, even non-MC-ALLOC builds get useful uid's in their bare lrecords. Redo related code for strings so the non-ascii count that is stored in the uid isn't hosed. - + * events.c: * events.c (deinitialize_event): * events.c (zero_event): Save and restore the uid around event zeroing/deadbeefing. - + * lisp.h: Set the correct value of MAX_STRING_ASCII_BEGIN under MC_ALLOC. - + * lisp.h (ZEROP): * lisp.h (XINT): * lisp.h (CHECK_INT): @@ -2626,7 +3655,7 @@ XCHAR and CHARP have additional error-checking in that they check to make sure that the value in question is not just a character but a valid character (i.e. its numeric value is valid). - + * print.c: * print.c (debug_p4): debug_p4 now has a useful UID in all cases and uses it; but it also prints @@ -2875,7 +3904,7 @@ * frame-msw.c: * frame-msw.c (decode_mswindows_frame): New function, like decode_x_frame. - + * frame-msw.c (mswindows_window_id): * frame-msw.c (mswindows_frame_property): * frame-msw.c (mswindows_internal_frame_property_p): @@ -3083,7 +4112,7 @@ 2005-10-10 Andrey Slusar * unexelf.c: define `Elfw(type)' for FreeBSD alpha and all _LP64 - archs. + archs. From Dejan Lesjak 2005-10-04 Stephen J. Turnbull @@ -3588,9 +4617,9 @@ New lrecord allocation and free functions: * alloc.c (alloc_lrecord): New. Allocates an lrecord, includes - type checking and initializing of the lrecord_header. + type checking and initializing of the lrecord_header. * alloc.c (noseeum_alloc_lrecord): Same as above, but increments - the NOSEEUM cons counter. + the NOSEEUM cons counter. * alloc.c (free_lrecord): New. Calls the finalizer and frees the lrecord. * lrecord.h: Add lrecord allocation prototypes and comments. @@ -3620,7 +4649,7 @@ Allocate old lrecords with new allocator: * alloc.c: DECLARE_FIXED_TYPE_ALLOC removed for all lrecords - defined in alloc.c. + defined in alloc.c. * alloc.c (Fcons): Allocate with new allocator. * alloc.c (noseeum_cons): Allocate with new allocator. * alloc.c (make_float): Allocate with new allocator. @@ -3687,8 +4716,8 @@ * alloc.c (free_marker): Use new allocator to free. * alloc.c (garbage_collect_1): Remove release_breathing_space. * alloc.c (gc_sweep): Remove all the old lcrecord and lrecord - related stuff. Sweeping now works like this: compact string - chars, finalize, sweep. + related stuff. Sweeping now works like this: compact string + chars, finalize, sweep. * alloc.c (common_init_alloc_early): Remove old lrecord initializations, remove breathing_space. * emacs.c (Fdump_emacs): Remove release_breathing_space. @@ -3708,39 +4737,39 @@ These changes build the interface to mc-alloc: * lrecord.h (MC_ALLOC_CALL_FINALIZER): Tell mc-alloc how to - finalize lrecords. + finalize lrecords. * lrecord.h (MC_ALLOC_CALL_FINALIZER_FOR_DISKSAVE): Tell - mc-alloc how to finalize for disksave. - - Unify lrecords and lcrecords: + mc-alloc how to finalize for disksave. + + Unify lrecords and lcrecords: * lisp.h (struct Lisp_String): Adjust string union hack to - new lrecord header. + new lrecord header. * lrecord.h: Adjust comments. * lrecord.h (struct lrecord_header): The new lrecord header - includes type, lisp-readonly, free, and uid. + includes type, lisp-readonly, free, and uid. * lrecord.h (set_lheader_implementation): Adjust to new - lrecord_header. + lrecord_header. * lrecord.h (struct lrecord_implementation): The field basic_p - for indication of an old lrecord is not needed anymore, remove. + for indication of an old lrecord is not needed anymore, remove. * lrecord.h (MAKE_LRECORD_IMPLEMENTATION): Remove basic_p. * lrecord.h (MAKE_EXTERNAL_LRECORD_IMPLEMENTATION): Remove - basic_p. + basic_p. * lrecord.h (copy_sized_lrecord): Remove distinction between - old lrecords and lcrecords. + old lrecords and lcrecords. * lrecord.h (copy_lrecord): Remove distinction between old - lrecords and lcrecords. + lrecords and lcrecords. * lrecord.h (zero_sized_lrecord): Remove distinction between - old lrecords and lcrecords. + old lrecords and lcrecords. * lrecord.h (zero_lrecord): Remove distinction between old - lrecords and lcrecords. + lrecords and lcrecords. Remove lcrecords and lcrecord lists: * alloc.c (basic_alloc_lcrecord): Not needed anymore, remove. * alloc.c (very_old_free_lcrecord): Not needed anymore, remove. * alloc.c (copy_lisp_object): No more distinction between - lrecords and lcrecords. + lrecords and lcrecords. * alloc.c (all_lcrecords): Not needed anymore, remove. * alloc.c (make_vector_internal): Allocate as lrecord. * alloc.c (make_bit_vector_internal): Allocate as lrecord. @@ -3761,13 +4790,13 @@ * alloc.c (kkcc_marking): Remove XD_FLAG_FREE_LISP_OBJECT * alloc.c (sweep_lcrecords_1): Remove. * alloc.c (common_init_alloc_early): Remove everything related - to lcrecords, remove old lrecord initializations, + to lcrecords, remove old lrecord initializations, * alloc.c (init_lcrecord_lists): Not needed anymore, remove. * alloc.c (reinit_alloc_early): Remove everything related to lcrecords. * alloc.c (init_alloc_once_early): Remove everything related to lcrecords. - * buffer.c (allocate_buffer): Allocate as lrecord. + * buffer.c (allocate_buffer): Allocate as lrecord. * buffer.c (nuke_all_buffer_slots): Use lrecord functions. * buffer.c (common_init_complex_vars_of_buffer): Allocate as lrecord. @@ -3809,7 +4838,7 @@ * event-stream.c (allocate_command_builder): Allocate as lrecord. * event-stream.c (free_command_builder): Use lrecord functions. * event-stream.c (event_stream_generate_wakeup): Allocate as - lrecord. + lrecord. * event-stream.c (event_stream_resignal_wakeup): Use lrecord functions. * event-stream.c (event_stream_disable_wakeup): Use lrecord @@ -3861,7 +4890,7 @@ * emacs.c (main_1): Remove lstream initialization. * mule-charset.c (make_charset): Allocate as lrecord. * objects-impl.h (struct Lisp_Color_Instance): Add - lrecord_header. + lrecord_header. * objects-impl.h (struct Lisp_Font_Instance): Add lrecord_header. * objects.c (Fmake_color_instance): Allocate as lrecord. * objects.c (Fmake_font_instance): Allocate as lrecord. @@ -3924,11 +4953,11 @@ * scrollbar-msw.c (mswindows_compute_scrollbar_instance_usage): Get storage size from new allocator. * scrollbar-x.c (x_compute_scrollbar_instance_usage): Get - storage size from new allocator. + storage size from new allocator. * scrollbar.c (compute_scrollbar_instance_usage): Get storage - size from new allocator. + size from new allocator. * unicode.c (compute_from_unicode_table_size_1): Get storage - size from new allocator. + size from new allocator. * unicode.c (compute_to_unicode_table_size_1): Get storage size from new allocator. * window.c (compute_window_mirror_usage): Get storage size from @@ -3953,7 +4982,7 @@ Strings: - * alloc.c (Fmake_string): Initialize ascii_begin to zero. + * alloc.c (Fmake_string): Initialize ascii_begin to zero. * alloc.c (gc_count_num_short_string_in_use): Remove. * alloc.c (gc_count_string_total_size): Remove. * alloc.c (gc_count_short_string_total_size): Remove. @@ -3965,7 +4994,7 @@ * alloc.c (c_readonly): Not needed anymore, remove. * alloc.c (GC_CHECK_LHEADER_INVARIANTS): Remove some obsolete - lheader invariants assertions. + lheader invariants assertions. * buffer.c (DEFVAR_BUFFER_LOCAL_1): Allocate dynamically. * console.c (DEFVAR_CONSOLE_LOCAL_1): Allocate dynamically. * gpmevent.c: Indirection via MC_ALLOC_Freceive_gpm_event. @@ -3974,9 +5003,9 @@ * lisp.h (C_READONLY): Not needed anymore, remove. * lisp.h (DEFUN): Allocate dynamically. * lrecord.h (C_READONLY_RECORD_HEADER_P): Not needed anymore, - remove. + remove. * lrecord.h (SET_C_READONLY_RECORD_HEADER): Not needed anymore, - remove. + remove. * symbols.c (guts_of_unbound_marker): * symeval.h (defsubr): Allocate dynamically. * symeval.h (DEFSUBR_MACRO): Allocate dynamically. @@ -3987,7 +5016,7 @@ * lisp.h: Add mcpro prototypes. * alloc.c (common_init_alloc_early): Add initialization for - mcpros. + mcpros. * alloc.c (mcpro_description_1): New. * alloc.c (mcpro_description): New. * alloc.c (mcpros_description_1): New. @@ -4049,14 +5078,14 @@ * config.h.in: Add new flag `DUMP_IN_EXEC' * emacs.c: Condition dump-data.h on DUMP_IN_EXEC. * emacs.c (main_1): Flag `-si' only works if dump image is - written into executable. + written into executable. Miscellanious * lrecord.h (enum lrecord_type): Added numbers to all types, - very handy for debugging. + very handy for debugging. * xemacs.def.in.in: Add mc-alloc functions to make them visible - to the modules. + to the modules. 2005-04-06 Stephen J. Turnbull @@ -4097,7 +5126,7 @@ 2005-02-24 Andrey Slusar - * unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64. + * unexelf.c: define `Elfw(type)' for FreeBSD alpha and amd64. 2005-03-25 Marcus Crestani @@ -4192,7 +5221,7 @@ 2005-03-02 Marcus Crestani * redisplay.h (struct rune): make type field an int, to fix - KKCC marking of unions. + KKCC marking of unions. 2005-01-13 Stephen J. Turnbull @@ -4259,9 +5288,9 @@ 2005-02-26 Aidan Kehoe * select-x.c (x_reply_selection_request): Use XtRegisterDrawable - to tell Xt not to drop PropertyChange events destined for the - selection request target window. This makes incremental selection - transfer work, instead of looping until interrupted. + to tell Xt not to drop PropertyChange events destined for the + selection request target window. This makes incremental selection + transfer work, instead of looping until interrupted. 2005-01-06 Andrey Slusar @@ -5156,11 +6185,11 @@ 2004-10-27 Ben Wing --------------------------------------------------------------- - MULE-RELATED WORK: + MULE-RELATED WORK: --------------------------------------------------------------- --------------------------- - byte-char conversion + byte-char conversion --------------------------- * buffer.c: @@ -5455,7 +6484,7 @@ int -> Bytecount. --------------------------- - Mule-izing + Mule-izing --------------------------- * device-x.c: @@ -5556,7 +6585,7 @@ use in Mule-ization work in frame-x.c etc. --------------------------- - Freshening + Freshening --------------------------- * intl-auto-encap-win32.c: @@ -5966,7 +6995,7 @@ Regenerate. --------------------------- - Unicode-work + Unicode-work --------------------------- * intl-win32.c (convert_multibyte_to_unicode_malloc): @@ -5999,7 +7028,7 @@ Dump the blank tables as well. --------------------------------------------------------------- - DOCUMENTATION, MOSTLY MULE-RELATED: + DOCUMENTATION, MOSTLY MULE-RELATED: --------------------------------------------------------------- * EmacsFrame.c (Xt_StringToScrollBarPlacement): @@ -6100,7 +7129,7 @@ @@#### comments are out-of-date. --------------------------------------------------------------- - PDUMP WORK (MOTIVATED BY UNICODE CHANGES) + PDUMP WORK (MOTIVATED BY UNICODE CHANGES) --------------------------------------------------------------- * alloc.c (lispdesc_block_size_1): @@ -6178,7 +7207,7 @@ remove incorrect comment about pdump problems with gap array. --------------------------------------------------------------- - ALLOCATION + ALLOCATION --------------------------------------------------------------- * abbrev.c (abbrev_oblookup): @@ -6312,7 +7341,7 @@ the alloca() kinds. --------------------------------------------------------------- - ERROR-CHECKING + ERROR-CHECKING --------------------------------------------------------------- * text.h (eicpy_c): @@ -6325,7 +7354,7 @@ --------------------------------------------------------------- - MACROS IN LISP.H + MACROS IN LISP.H --------------------------------------------------------------- * lisp.h (GCDECL1): @@ -6384,7 +7413,7 @@ --------------------------------------------------------------- - SPACING FIXES + SPACING FIXES --------------------------------------------------------------- * callint.c (Fcall_interactively): @@ -6395,7 +7424,7 @@ --------------------------------------------------------------- - FIX FOR GEOMETRY PROBLEM IN FIRST FRAME + FIX FOR GEOMETRY PROBLEM IN FIRST FRAME --------------------------------------------------------------- * unicode.c (init_charset_unicode_tables): @@ -6406,7 +7435,7 @@ will be overridden by my other ws. --------------------------------------------------------------- - FIX FOR LEAKING PROCESS HANDLES: + FIX FOR LEAKING PROCESS HANDLES: --------------------------------------------------------------- @@ -6422,7 +7451,7 @@ . --------------------------------------------------------------- - FIX FOR CYGWIN BUG (Unicode-related): + FIX FOR CYGWIN BUG (Unicode-related): --------------------------------------------------------------- * unicode.c (init_charset_unicode_tables): @@ -6430,7 +7459,7 @@ release 1.5.12 of Cygwin]. --------------------------------------------------------------- - WARNING FIXES: + WARNING FIXES: --------------------------------------------------------------- * console-stream.c (init_console_stream): @@ -6449,7 +7478,7 @@ Gather includes together to avoid warning. --------------------------------------------------------------- - CHANGES TO INITIALIZATION ROUTINES: + CHANGES TO INITIALIZATION ROUTINES: --------------------------------------------------------------- * buffer.c (vars_of_buffer): @@ -6505,7 +7534,7 @@ in the latter calls. --------------------------------------------------------------- - ARMAGEDDON: + ARMAGEDDON: --------------------------------------------------------------- * alloc.c: @@ -6539,7 +7568,7 @@ in places where problems would arise. --------------------------------------------------------------- - CHANGES TO THE BUILD PROCEDURE: + CHANGES TO THE BUILD PROCEDURE: --------------------------------------------------------------- * config.h.in: @@ -7252,9 +8281,9 @@ * glyphs-gtk.c (gtk_xpm_instantiate): Rewrite the XPM data to replace symbolic color entries with the real colors specified in xpm-color-symbols, before passing the XPM to gtk. - * glyphs-gtk.h: Use the generic pixmap_image_instance.mask for masks, - instead of a GTK specific field, so that it is used in by generic - code. + * glyphs-gtk.h: Use the generic pixmap_image_instance.mask for masks, + instead of a GTK specific field, so that it is used in by generic + code. 2004-05-15 Malcolm Purvis @@ -8495,25 +9524,25 @@ 2003-04-24 Matthew O. Persico - * unicode.c: Removed trailing commas in some enums; older - (Solaris 2.7 cc) compiler produced volumous warnings. - - * text.c: Replaced char initialization of static Ibyte - strcasecmp_charmap[] with octal numeric init. Apparently older - (Solaris 2.7 cc) compiler treats quoted octals as signed, - causing 256 signed-assigned-to-unsigned warnings. - - * lrecord.h: Removed trailing commas in some enums; older - (Solaris 2.7 cc) compiler produced volumous warnings. - - * lisp.h: Removed trailing commas in some enums; older - (Solaris 2.7 cc) compiler produced volumous warnings. - - * frame.c: Removed trailing commas in some enums; older - (Solaris 2.7 cc) compiler produced volumous warnings. - - * file-coding.h: Removed trailing commas in some enums; older - (Solaris 2.7 cc) compiler produced volumous warnings. + * unicode.c: Removed trailing commas in some enums; older + (Solaris 2.7 cc) compiler produced volumous warnings. + + * text.c: Replaced char initialization of static Ibyte + strcasecmp_charmap[] with octal numeric init. Apparently older + (Solaris 2.7 cc) compiler treats quoted octals as signed, + causing 256 signed-assigned-to-unsigned warnings. + + * lrecord.h: Removed trailing commas in some enums; older + (Solaris 2.7 cc) compiler produced volumous warnings. + + * lisp.h: Removed trailing commas in some enums; older + (Solaris 2.7 cc) compiler produced volumous warnings. + + * frame.c: Removed trailing commas in some enums; older + (Solaris 2.7 cc) compiler produced volumous warnings. + + * file-coding.h: Removed trailing commas in some enums; older + (Solaris 2.7 cc) compiler produced volumous warnings. 2003-04-17 Stephen J. Turnbull @@ -9852,7 +10881,7 @@ 2003-02-06 Andrew Begel - * sysdll.c: Included lisp.h to define needed alloca_array. + * sysdll.c: Included lisp.h to define needed alloca_array. 2003-02-07 Jerry James @@ -9932,7 +10961,7 @@ * event-stream.c (event_stream_select_process): * event-stream.c (event_stream_unselect_process): * event-stream.c (event_stream_create_io_streams): - * event-stream.c (event_stream_delete_io_streams): + * event-stream.c (event_stream_delete_io_streams): * event-stream.c (event_stream_current_event_timestamp): * event-stream.c (event_stream_next_event): Remove unused parameter to check_event_stream_ok() and change @@ -11576,8 +12605,8 @@ 2002-08-06 Jerry James - * window.c (Fsplit_window): Count only half of the divider width - against the left window when splitting horizontally. + * window.c (Fsplit_window): Count only half of the divider width + against the left window when splitting horizontally. 2002-07-29 Jerry James @@ -11682,7 +12711,7 @@ * tooltalk.c: tooltalk_message_description tooltalk_pattern_description * ui-gtk.c: emacs_ffi_description - emacs_gtk_object_description + emacs_gtk_object_description * events.c: * events.h: @@ -11718,7 +12747,7 @@ * device-impl.h (struct device): added enum console_variant devtype * objects.c: image_instance_description - font_instance_description + font_instance_description (Fmake_color_instance): added variant initialization (Fmake_font_instance): added variant initialization * objects-impl.h (struct Lisp_Color_Instance): added color_instance_type @@ -11954,7 +12983,7 @@ Jens Müller Mike Sperber - * lrecord.h (lrecord_type): add lrecord_type_ephemeron + * lrecord.h (lrecord_type): add lrecord_type_ephemeron to lrecord_type enumeration. * lisp.h (XEPHEMERON): @@ -11968,25 +12997,25 @@ (EPHEMERONP): (CHECK_EPHEMERON): (CONCHECK_EPHEMERON): - (struct ephemeron): Add representation of ephemerons. - - * alloc.c (garbage_collect_1): - (finish_marking_ephemerons): - (prune_ephemerons): Call. - - * data.c: - (finish_marking_ephemerons): - (prune_ephemerons): - (mark_ephemeron): - (print_ephemeron): - (ephemeron_equal) - (ephemeron_hash):: - (make_ephemeron): - (Fmake_ephemeron): - (Fephemeronp): - (Fephemeron_ref): - (syms_of_data): - (vars_of_data): Add implementation of ephemerons + (struct ephemeron): Add representation of ephemerons. + + * alloc.c (garbage_collect_1): + (finish_marking_ephemerons): + (prune_ephemerons): Call. + + * data.c: + (finish_marking_ephemerons): + (prune_ephemerons): + (mark_ephemeron): + (print_ephemeron): + (ephemeron_equal) + (ephemeron_hash):: + (make_ephemeron): + (Fmake_ephemeron): + (Fephemeronp): + (Fephemeron_ref): + (syms_of_data): + (vars_of_data): Add implementation of ephemerons 2002-06-28 Steve Youngs @@ -13526,7 +14555,7 @@ 2002-05-28 Ben Wing ================================================================ - ALLOW SEPARATION OF STDOUT AND STDERR IN PROCESSES + ALLOW SEPARATION OF STDOUT AND STDERR IN PROCESSES ================================================================ Standard output and standard error can be processed separately in @@ -13534,13 +14563,13 @@ and its filter function. You can specify a separate buffer for stderr in `start-process' to get things started, or use the new primitives: - set-process-stderr-buffer - process-stderr-buffer + set-process-stderr-buffer + process-stderr-buffer process-stderr-mark - set-process-stderr-filter + set-process-stderr-filter process-stderr-filter - Also, process-send-region takes a 4th optional arg, a buffer. + Also, process-send-region takes a 4th optional arg, a buffer. Currently always uses a pipe() under Unix to read the error output. (#### Would a PTY be better?) @@ -13661,14 +14690,14 @@ * gpmevent.c (Fgpm_enable): * tooltalk.c: * tooltalk.c (init_tooltalk): - set_process_filter takes an argument for stderr. + set_process_filter takes an argument for stderr. ================================================================ - NEW ERROR-TRAPPING MECHANISM + NEW ERROR-TRAPPING MECHANISM ================================================================ - Totally rewrite error trapping code to be unified and support more - features. Basic function is call_trapping_problems(), which lets + Totally rewrite error trapping code to be unified and support more + features. Basic function is call_trapping_problems(), which lets you specify, by means of flags, what sorts of problems you want trapped. these can include @@ -13720,7 +14749,7 @@ internal_catch takes another arg. * eval.c: - Add long comments describing the "five lists" used to maintain + Add long comments describing the "five lists" used to maintain state (backtrace, gcpro, specbind, etc.) in the Lisp engine. * backtrace.h: @@ -13835,12 +14864,12 @@ * glyphs-widget.c (widget_query_geometry): * glyphs-widget.c (layout_query_geometry): * redisplay.h: - Protect calling Lisp in redisplay. + Protect calling Lisp in redisplay. * insdel.c (signal_first_change): * insdel.c (signal_before_change): * insdel.c (signal_after_change): - Protect hooks against deleting existing buffers. + Protect hooks against deleting existing buffers. * frame-msw.c (mswindows_init_frame_1): Use EQ, not EQUAL in hash tables whose keys are just numbers. @@ -13848,7 +14877,7 @@ internal_equal() can QUIT. ================================================================ - SIGNAL, C-G CHANGES + SIGNAL, C-G CHANGES ================================================================ Here we change the way that C-g interacts with event reading. The @@ -13860,7 +14889,7 @@ involving enqueue/dequeue of a C-g and interaction with Vquit_flag -- and it didn't work. - Now, we simply enclose all code where we want C-g read as an event + Now, we simply enclose all code where we want C-g read as an event with {begin/end}_dont_check_for_quit(). This completely turns off the mechanism that checks (and may remove or alter) C-g in the read-ahead queues, so we just get the C-g normal. @@ -13868,8 +14897,8 @@ Signal.c documents this very carefully. * cmdloop.c (Fcommand_loop_1): - Correct use of dont_check_for_quit to new scheme, remove old - out-of-date comments. + Correct use of dont_check_for_quit to new scheme, remove old + out-of-date comments. * event-stream.c (maybe_echo_keys): * event-stream.c (enqueue_command_event_1): @@ -13898,20 +14927,20 @@ * signal.c (check_what_happened): * signal.c (begin_dont_check_for_quit): * signal.c (check_quit): - Cleanup. Add large descriptive comment. + Cleanup. Add large descriptive comment. * process-unix.c (unix_open_network_stream): * process-unix.c (unix_open_multicast_group): * process-nt.c (nt_open_network_stream): * sysdep.c (retry_read_1): * sysdep.c (retry_write_1): - Use QUIT instead of REALLY_QUIT. - It's not necessary to use REALLY_QUIT and just confuses the issue. + Use QUIT instead of REALLY_QUIT. + It's not necessary to use REALLY_QUIT and just confuses the issue. * lisp.h (INTERNAL_QUITP): Comment quit handlers. ================================================================ - CONS CHANGES + CONS CHANGES ================================================================ free_cons() now takes a Lisp_Object not the result of XCONS(). @@ -13943,18 +14972,18 @@ * lread.c (various): * lisp.h (struct Lisp_Cons): * lisp.h (cons_car): - Correct free_cons calling convention: now takes Lisp_Object, - not Lisp_Cons + Correct free_cons calling convention: now takes Lisp_Object, + not Lisp_Cons * chartab.c (word_boundary_p): - Eliminate direct use of ->car, ->cdr, should be black box. + Eliminate direct use of ->car, ->cdr, should be black box. * callint.c (quotify_args): - Rewrote using EXTERNAL_LIST_LOOP to avoid use of Lisp_Cons. + Rewrote using EXTERNAL_LIST_LOOP to avoid use of Lisp_Cons. ================================================================ - USE INTERNAL-BIND-* + USE INTERNAL-BIND-* ================================================================ * eval.c (restore_lisp_object): @@ -13990,17 +15019,17 @@ * redisplay.c (redisplay_without_hooks): * menubar-x.c (pre_activate_callback): * macros.c (Fexecute_kbd_macro): - Rewrote to use internal_bind_int() and internal_bind_lisp_object() + Rewrote to use internal_bind_int() and internal_bind_lisp_object() in place of whatever varied and cumbersome mechanisms were formerly there. ================================================================ - SPECBIND SANITY + SPECBIND SANITY ================================================================ * backtrace.h: - - Improved comments + - Improved comments * backtrace.h (SPECBIND): * backtrace.h (SPECBIND_FAST_UNSAFE): @@ -14014,12 +15043,12 @@ * eval.c (record_unwind_protect): * eval.c (unbind_to_1): * eval.c (unbind_to_hairy): - Add new mechanism check_specbind_stack_sanity() for sanity + Add new mechanism check_specbind_stack_sanity() for sanity checking code each time the catchlist or specbind stack change. Removed older prototype of same mechanism. ================================================================ - MISC + MISC ================================================================ * lisp.h: @@ -14035,13 +15064,13 @@ * print.c (debug_print_no_newline): * print.c (debug_backtrace): - Be more careful when not initialized or in fatal error handling. + Be more careful when not initialized or in fatal error handling. * search.c (looking_at_1): * search.c (string_match_1): * search.c (search_buffer): * search.c (Fstore_match_data): - Eliminate running_asynch_code, an FSF holdover. + Eliminate running_asynch_code, an FSF holdover. * alloc.c (vars_of_alloc): * alloc.c: @@ -14057,7 +15086,7 @@ * lisp-disunion.h: * lisp-union.h: - Added warnings on use of VOID_TO_LISP(). + Added warnings on use of VOID_TO_LISP(). * lisp.h: Use ERROR_CHECK_STRUCTURES to turn on @@ -14073,7 +15102,7 @@ but it required manual twiddling the gcpro structure.) * lisp.h: - Add prototypes for new functions defined elsewhere. + Add prototypes for new functions defined elsewhere. 2002-05-23 Ben Wing @@ -14345,10 +15374,10 @@ 2002-04-23 Jerry James * select.c (Fown_selection_internal): Document connection with - interprogram-cut-function. + interprogram-cut-function. * select.c (Fget_selection_internal): return Qnil if XEmacs owns - the selection and it does not need coercion. - Document connection with interprogram-paste-function. + the selection and it does not need coercion. + Document connection with interprogram-paste-function. 2002-05-06 Jonathan Harris @@ -15207,7 +16236,7 @@ 2002-04-30 Charles G. Waldman - * sysdep.c (sys_siglist): change "signum" to "signal" + * sysdep.c (sys_siglist): change "signum" to "signal" 2001-04-21 Martin Buchholz @@ -15218,7 +16247,7 @@ * s/linux.h (LIB_STANDARD): Define correctly for x86-64 and s390x which use lib64 for 64-bit libs. - (START_FILES): Likewise. + (START_FILES): Likewise. 2002-02-11 Mike Sperber @@ -15325,7 +16354,7 @@ 2002-04-30 Charles G. Waldman - * sysdep.c (sys_siglist): change "signum" to "signal" + * sysdep.c (sys_siglist): change "signum" to "signal" 2002-04-24 Andy Piper @@ -17081,61 +18110,61 @@ 2002-03-16 IKEYAMA Tomonori - * unicode.c (add_charsets_to_precedence_list): Fix passing wrong - argument to XCHARSET_LEADING_BYTE. + * unicode.c (add_charsets_to_precedence_list): Fix passing wrong + argument to XCHARSET_LEADING_BYTE. 2002-03-15 Jonathan Harris - * intl-encap-win32.c (copy_shfileinfoa_to_shfileinfow): - Take size parameter and assert it's big enough. - * intl-encap-win32.c (qxeSHGetFileInfo): - Deal with the case where no fileinfo structure is passed in. + * intl-encap-win32.c (copy_shfileinfoa_to_shfileinfow): + Take size parameter and assert it's big enough. + * intl-encap-win32.c (qxeSHGetFileInfo): + Deal with the case where no fileinfo structure is passed in. 2002-03-14 Jonathan Harris - * intl-encap-win32.c: Remove EncryptFile, DecryptFile & - mciGetDeviceIDFromElementID - APIs are not available on Win98 - * intl-auto-encap-win32.c: ditto - * intl-auto-encap-win32.h: ditto - * intl-encap-win32.c: Remove 'dir' command. + * intl-encap-win32.c: Remove EncryptFile, DecryptFile & + mciGetDeviceIDFromElementID - APIs are not available on Win98 + * intl-auto-encap-win32.c: ditto + * intl-auto-encap-win32.h: ditto + * intl-encap-win32.c: Remove 'dir' command. 2002-03-13 William M. Perry - * ui-gtk.c (__allocate_object_storage): Make static to avoid - warnings. - (type_to_marshaller_type): Ditto. - - * symsinit.h: Added some missing *_gtk_* functions to avoid - warnings. - - * select-gtk.c: Add extern definitions of lisp_to_time and - time_to_lisp to avoid warnings. - - * redisplay-gtk.c (gtk_flash): reorder select/poll stuff to avoid - warning about 'poll' being implicitly defined. Mirrors change - made to redisplay-x.c some time ago. - (gtk_bevel_area): Fix unused variable warning. - - * gtk-xemacs.c (smash_face_fallbacks): ifdef this out to avoid - warnings. - - * glyphs-gtk.c (write_lisp_string_to_temp_file): Fix 'grpro3' - typo. - (gtk_locate_pixmap_file): Use split_external_path instead of - decode_path. - - * gccache-gtk.c (gc_cache_hash): Fix signed/unsigned warning. - - * event-gtk.c: event-mods.h no longer needed. event-gtk.h is. - - * emacs-marshals.c (our_string_hash): Make this function static to - avoid warnings. - - * device-gtk.c (gtk_event_name): Fix signed/unsigned warning. - - * event-gtk.h: New header file to hold declarations from - event-gtk.c that are used in other files. The quest to remove - compilation warnings from GTK files begins. + * ui-gtk.c (__allocate_object_storage): Make static to avoid + warnings. + (type_to_marshaller_type): Ditto. + + * symsinit.h: Added some missing *_gtk_* functions to avoid + warnings. + + * select-gtk.c: Add extern definitions of lisp_to_time and + time_to_lisp to avoid warnings. + + * redisplay-gtk.c (gtk_flash): reorder select/poll stuff to avoid + warning about 'poll' being implicitly defined. Mirrors change + made to redisplay-x.c some time ago. + (gtk_bevel_area): Fix unused variable warning. + + * gtk-xemacs.c (smash_face_fallbacks): ifdef this out to avoid + warnings. + + * glyphs-gtk.c (write_lisp_string_to_temp_file): Fix 'grpro3' + typo. + (gtk_locate_pixmap_file): Use split_external_path instead of + decode_path. + + * gccache-gtk.c (gc_cache_hash): Fix signed/unsigned warning. + + * event-gtk.c: event-mods.h no longer needed. event-gtk.h is. + + * emacs-marshals.c (our_string_hash): Make this function static to + avoid warnings. + + * device-gtk.c (gtk_event_name): Fix signed/unsigned warning. + + * event-gtk.h: New header file to hold declarations from + event-gtk.c that are used in other files. The quest to remove + compilation warnings from GTK files begins. 2002-03-15 Ben Wing @@ -19171,7 +20200,7 @@ 2001-06-17 Ben Wing --------------------------------------------------------------- - DOCUMENTATION FIXES: + DOCUMENTATION FIXES: --------------------------------------------------------------- * eval.c (Ffunction_min_args): @@ -19181,7 +20210,7 @@ * elhash.c (Fremhash): Doc correction. --------------------------------------------------------------- - LISP OBJECT CLEANUP: + LISP OBJECT CLEANUP: --------------------------------------------------------------- * bytecode.h (wrap_compiled_function): @@ -19335,7 +20364,7 @@ Use internal_object_printer, since this object should not escape. --------------------------------------------------------------- - FIXING A CRASH THAT I HIT ONCE (AND A RELATED BAD BEHAVIOR): + FIXING A CRASH THAT I HIT ONCE (AND A RELATED BAD BEHAVIOR): --------------------------------------------------------------- * eval.c (unwind_to_catch): @@ -19445,7 +20474,7 @@ Update comments about correct marking. --------------------------------------------------------------- - ISSUES BROUGHT UP BY MARTIN: + ISSUES BROUGHT UP BY MARTIN: --------------------------------------------------------------- * buffer.h (DFC_C_STRING_ALLOCA_USE_CONVERTED_DATA): @@ -21369,24 +22398,24 @@ 2001-05-12 Craig Lanning - * s\mingw32.h: - Properly find MinGW's inside Cygwin's restructured - include directories. Don't try to include - since we are dropping support for MinGW in versions of Cygwin - earlier than b21. + * s\mingw32.h: + Properly find MinGW's inside Cygwin's restructured + include directories. Don't try to include + since we are dropping support for MinGW in versions of Cygwin + earlier than b21. 2001-05-12 Craig Lanning - * nt.c: - Drop support for MinGW in versions of Cygwin before b21. - * sysdep.c: - Properly find MinGW's inside Cygwin's restructured - include directories. - * syswindows.h: - Drop support for MinGW in versions of Cygwin before b21. - * unexcw.c: - Even though a.out.h is no longer detected by configure, allow - MinGW to use it until we figure out how to do the job with Win32. + * nt.c: + Drop support for MinGW in versions of Cygwin before b21. + * sysdep.c: + Properly find MinGW's inside Cygwin's restructured + include directories. + * syswindows.h: + Drop support for MinGW in versions of Cygwin before b21. + * unexcw.c: + Even though a.out.h is no longer detected by configure, allow + MinGW to use it until we figure out how to do the job with Win32. 2001-05-19 Ben Wing @@ -25062,7 +26091,7 @@ * fns.c: Include if available. Don't declare our own getloadavg() if HAVE_GETLOADAVG. - * config.h.in: Group together getloadavg()-related macros. + * config.h.in: Group together getloadavg()-related macros. Use only configure-time tests to detect getloadavg(). 2000-07-30 Martin Buchholz @@ -25285,12 +26314,12 @@ 2000-07-15 Ben Wing - * s/cygwin32.h: - * s/cygwin32.h (CYGWIN_CONV_PATH): - Add missing logb prototype for v1.1. - Use post-b20 names and alias to pre-b20 names when pre-b20. - - * s/windowsnt.h: [5]. + * s/cygwin32.h: + * s/cygwin32.h (CYGWIN_CONV_PATH): + Add missing logb prototype for v1.1. + Use post-b20 names and alias to pre-b20 names when pre-b20. + + * s/windowsnt.h: [5]. 2000-07-15 Ben Wing @@ -25299,18 +26328,18 @@ * Makefile.in.in (objs): added win32.o, cosmetic cleanups. - * alloc.c (Fmake_byte_code): - [[[1]]]: Changes for new LIST_LOOP, EXTERNAL_LIST_LOOP, - etc. macros which declare their own args now. - - * alloc.c (syms_of_alloc): - [[[2]]]: Use DEFSYMBOL, DEFKEYWORD, DEFERROR and friends. - - * buffer.c: - Moved buffer-dedicated-frame, set-buffer-dedicated-frame into lisp. - - * buffer.c (Fget_file_buffer): - Fixed GCPRO problem. + * alloc.c (Fmake_byte_code): + [[[1]]]: Changes for new LIST_LOOP, EXTERNAL_LIST_LOOP, + etc. macros which declare their own args now. + + * alloc.c (syms_of_alloc): + [[[2]]]: Use DEFSYMBOL, DEFKEYWORD, DEFERROR and friends. + + * buffer.c: + Moved buffer-dedicated-frame, set-buffer-dedicated-frame into lisp. + + * buffer.c (Fget_file_buffer): + Fixed GCPRO problem. * glyphs-msw.c (bmp_normalize): (mswindows_resource_normalize): add dest_mask so that it can be @@ -25620,446 +26649,446 @@ * events.c (Fevent_modifier_bits): Doc fix. - * buffer.c (get_truename_buffer): Fixed comment about GC + * buffer.c (get_truename_buffer): Fixed comment about GC checking. * events.c (Fevent_modifiers): Major doc addition. * events.c (event_x_y_pixel_internal): Typo fix. * events.c (syms_of_events): Declare new primitives. - * buffer.c (syms_of_buffer): - Undeclared those dedicated frame funs. - [2]. - - * buffer.h: - Define convenience macros for internal/external conversions. + * buffer.c (syms_of_buffer): + Undeclared those dedicated frame funs. + [2]. + + * buffer.h: + Define convenience macros for internal/external conversions. [[[3]]]: Define codesys aliases Qcommand_argument_encoding - and Qenvironment_variable_encoding for cleaner code. - - * bufslots.h: - Remove dedicated-frame; in lisp. - - * bytecode.c (funcall_compiled_function): - [1]. - - * bytecode.c (syms_of_bytecode): - [2]. - - * console-msw.c: - * console-msw.c (mswindows_show_console): Rewrote. - - * console-msw.c (Fmswindows_debugging_output): New. - Sends to OutputDebugString (special MSWin debugger interface). - - * console-msw.c (Fmswindows_message_box): - Fixed stupid bugs so it works when called from kill-emacs. - - * console-msw.c (syms_of_console_mswindows): - Declare Fmswindows_debugging_output. - - * console-msw.h: - New MSWin prototypes. - - * console-msw.h (struct mswindows_frame): - New entry last-click-mods for improved button-modifier support. - - * console-msw.h (FRAME_MSWINDOWS_POPUP): - New struct entry `popup' with corresponding accessor. - - * console-x.c: - * console-x.c (split_up_display_spec): - * console-x.c (get_display_arg_connection): - * console-x.c (x_semi_canonicalize_console_connection): - * console-x.c (x_canonicalize_device_connection): - [[[6]]]: Change char to more specific type. - [[[8]]]: Make use of abstracting codesys aliases defined in [3], [4]; - - * console-x.c (x_semi_canonicalize_console_connection): - * console-x.c (x_canonicalize_device_connection): - [[[9]]]: Fix up error signalling to use new structured error system. - - * console-x.h: - [[[4]]]: Define codesys aliases: - Qlwlib_encoding, Qx_atom_name_encoding, Qx_font_name_encoding, - Qx_color_name_encoding, Qx_display_name_encoding. - - * console.h (struct console_methods): - New method make_dialog_box_internal supersedes older - popup_dialog_box method. - - * data.c: - Define many new errors, part of new structured errors. - - * data.c (init_errors_once_early): - * data.c (syms_of_data): - [2]. - - * device-msw.c (mswindows_init_device): - [[[5]]]: Cleanup to support NT 3.51. - - * device-msw.c (decode_devmode): Cleanup. - - * device-msw.c (mswindows_handle_print_setup_dialog_box): - * device-msw.c (mswindows_handle_print_dialog_box): - * device-msw.c (mswindows_handle_page_setup_dialog_box): - * device-msw.c (syms_of_device_mswindows): - Delete the dialog box primitives recently introduced by Kirill and + and Qenvironment_variable_encoding for cleaner code. + + * bufslots.h: + Remove dedicated-frame; in lisp. + + * bytecode.c (funcall_compiled_function): + [1]. + + * bytecode.c (syms_of_bytecode): + [2]. + + * console-msw.c: + * console-msw.c (mswindows_show_console): Rewrote. + + * console-msw.c (Fmswindows_debugging_output): New. + Sends to OutputDebugString (special MSWin debugger interface). + + * console-msw.c (Fmswindows_message_box): + Fixed stupid bugs so it works when called from kill-emacs. + + * console-msw.c (syms_of_console_mswindows): + Declare Fmswindows_debugging_output. + + * console-msw.h: + New MSWin prototypes. + + * console-msw.h (struct mswindows_frame): + New entry last-click-mods for improved button-modifier support. + + * console-msw.h (FRAME_MSWINDOWS_POPUP): + New struct entry `popup' with corresponding accessor. + + * console-x.c: + * console-x.c (split_up_display_spec): + * console-x.c (get_display_arg_connection): + * console-x.c (x_semi_canonicalize_console_connection): + * console-x.c (x_canonicalize_device_connection): + [[[6]]]: Change char to more specific type. + [[[8]]]: Make use of abstracting codesys aliases defined in [3], [4]; + + * console-x.c (x_semi_canonicalize_console_connection): + * console-x.c (x_canonicalize_device_connection): + [[[9]]]: Fix up error signalling to use new structured error system. + + * console-x.h: + [[[4]]]: Define codesys aliases: + Qlwlib_encoding, Qx_atom_name_encoding, Qx_font_name_encoding, + Qx_color_name_encoding, Qx_display_name_encoding. + + * console.h (struct console_methods): + New method make_dialog_box_internal supersedes older + popup_dialog_box method. + + * data.c: + Define many new errors, part of new structured errors. + + * data.c (init_errors_once_early): + * data.c (syms_of_data): + [2]. + + * device-msw.c (mswindows_init_device): + [[[5]]]: Cleanup to support NT 3.51. + + * device-msw.c (decode_devmode): Cleanup. + + * device-msw.c (mswindows_handle_print_setup_dialog_box): + * device-msw.c (mswindows_handle_print_dialog_box): + * device-msw.c (mswindows_handle_page_setup_dialog_box): + * device-msw.c (syms_of_device_mswindows): + Delete the dialog box primitives recently introduced by Kirill and instead interface to general dialog box interface. - * device-x.c: - * device-x.c (compute_x_app_name): - * device-x.c (x_init_device): - * device-x.c (Fx_valid_keysym_name_p): - * device-x.c (Fx_set_font_path): - [6]. - [7]. - - First of its kind; meant to replace XSETDEVICE. - - * dialog-msw.c: Many file-dialog symbols. - - * dialog-msw.c (mswindows_register_popup_frame): New. - * dialog-msw.c (mswindows_is_dialog_msg): New. - For supporting kbd traversal in dialog boxes. - - * dialog-msw.c (dialog_proc): - Support hitting ESC in dialogs. - - * dialog-msw.c (struct): - Common dialog box errors. - - * dialog-msw.c (handle_file_dialog_box): New. - Add file dialog code. - - * dialog-msw.c (handle_question_dialog_box): - Redo existing code to support new question dialog syntax. - - * dialog-msw.c (console_type_create_dialog_mswindows): - We support new dialog console method. - - * dialog-msw.c (syms_of_dialog_mswindows): - * dialog-msw.c (vars_of_dialog_mswindows): - New file dialog symbols, vars. - - * dialog-x.c: - * dialog-x.c (maybe_run_dbox_text_callback): - * dialog-x.c (dbox_descriptor_to_widget_value): - * dialog-x.c (x_make_dialog_box_internal): - * dialog-x.c (console_type_create_dialog_x): - Mule-ize entire file. - Redo to support question dialog syntax. - [6]. - - * dialog.c: - * dialog.c (Fmake_dialog_box_internal): - * dialog.c (syms_of_dialog): - Kill old popup-dialog-box, replace with new primitive. - Just call device method or signal error. - - * eldap.c (Fldap_open): - * eldap.c (Fldap_search_basic): - * eldap.c (Fldap_add): - * eldap.c (Fldap_modify): - [1]. - [7]. - - * emacs.c: - * emacs.c (make_arg_list_1): - * emacs.c (make_arg_list): - Mule-ize call to dll_init(). - [6]. - [8]. - - * emacs.c (make_argc_argv): - * emacs.c (free_argc_argv): - * emacs.c (init_cmdargs): - * emacs.c (main_1): - * emacs.c (Fkill_emacs): - * emacs.c (Fdump_emacs): - Update comments about what can be used in syms_* etc. - Call init_win32() when necessary. - Fix up MS Win dialog box in kill-buffer to actually work right. - [7]. - - * eval.c: - * eval.c (For): - * eval.c (Fand): - * eval.c (Fprogn): - * eval.c (Fprog1): - * eval.c (Fprog2): - * eval.c (FletX): - * eval.c (Flet): - * eval.c (condition_case_3): - * eval.c (Feval): - * eval.c (function_argcount): - * eval.c (funcall_lambda): - [1]. - - * eval.c (type_error): New. - * eval.c (maybe_type_error): New. - * eval.c (continuable_type_error): New. - * eval.c (maybe_continuable_type_error): New. - * eval.c (type_error_with_frob): New. - * eval.c (maybe_type_error_with_frob): New. - * eval.c (continuable_type_error_with_frob): New. - * eval.c (maybe_continuable_type_error_with_frob): New. - New functions for use with structured errors. - - * event-Xt.c: - * event-Xt.c (x_event_to_emacs_event): - Buttons are now modifiers too. - - * event-Xt.c (emacs_Xt_current_event_timestamp): - Implement new event method. - * event-Xt.c (reinit_vars_of_event_Xt): Set it. - - * event-msw.c: - * event-msw.c (ntpipe_shove_writer): [5]. - * event-msw.c (mswindows_enqueue_mouse_button_event): - * event-msw.c (mswindows_drain_windows_queue): - * event-msw.c (mswindows_wnd_proc): [7]. - * event-msw.c (mswindows_current_layout_has_AltGr): [5]. - * event-msw.c (mswindows_modifier_state): - Throughout: support new button modifiers. - - * event-msw.c (emacs_mswindows_current_event_timestamp): - Implement new event method. - * event-msw.c (reinit_vars_of_event_mswindows): Set it. - - * event-stream.c: - * event-stream.c (event_stream_current_event_timestamp): New. - * event-stream.c (maybe_kbd_translate): New functionality. - * event-stream.c (vars_of_event_stream): - Document new kbd-translate-table functionality. - - * event-stream.c (Fcurrent_event_timestamp): New. - New primitive for use in fabricated events. - * event-stream.c (syms_of_event_stream): [2]. Declare new primitive. - - * events-mod.h (XEMACS_MOD_BUTTON1): new button modifiers. - - * events.c: - * events.c (Fmake_event): - * events.c (WRONG_EVENT_TYPE_FOR_PROPERTY): - [1]. - [9]. - - * events.c (format_event_object): fix gcc warnings. - - * events.c (Fevent_timestamp): Document new primitives. - - * events.c (TIMESTAMP_HALFSPACE): New. - - * events.c (Fevent_timestamp_lessp): New. New primitive for + * device-x.c: + * device-x.c (compute_x_app_name): + * device-x.c (x_init_device): + * device-x.c (Fx_valid_keysym_name_p): + * device-x.c (Fx_set_font_path): + [6]. + [7]. + + First of its kind; meant to replace XSETDEVICE. + + * dialog-msw.c: Many file-dialog symbols. + + * dialog-msw.c (mswindows_register_popup_frame): New. + * dialog-msw.c (mswindows_is_dialog_msg): New. + For supporting kbd traversal in dialog boxes. + + * dialog-msw.c (dialog_proc): + Support hitting ESC in dialogs. + + * dialog-msw.c (struct): + Common dialog box errors. + + * dialog-msw.c (handle_file_dialog_box): New. + Add file dialog code. + + * dialog-msw.c (handle_question_dialog_box): + Redo existing code to support new question dialog syntax. + + * dialog-msw.c (console_type_create_dialog_mswindows): + We support new dialog console method. + + * dialog-msw.c (syms_of_dialog_mswindows): + * dialog-msw.c (vars_of_dialog_mswindows): + New file dialog symbols, vars. + + * dialog-x.c: + * dialog-x.c (maybe_run_dbox_text_callback): + * dialog-x.c (dbox_descriptor_to_widget_value): + * dialog-x.c (x_make_dialog_box_internal): + * dialog-x.c (console_type_create_dialog_x): + Mule-ize entire file. + Redo to support question dialog syntax. + [6]. + + * dialog.c: + * dialog.c (Fmake_dialog_box_internal): + * dialog.c (syms_of_dialog): + Kill old popup-dialog-box, replace with new primitive. + Just call device method or signal error. + + * eldap.c (Fldap_open): + * eldap.c (Fldap_search_basic): + * eldap.c (Fldap_add): + * eldap.c (Fldap_modify): + [1]. + [7]. + + * emacs.c: + * emacs.c (make_arg_list_1): + * emacs.c (make_arg_list): + Mule-ize call to dll_init(). + [6]. + [8]. + + * emacs.c (make_argc_argv): + * emacs.c (free_argc_argv): + * emacs.c (init_cmdargs): + * emacs.c (main_1): + * emacs.c (Fkill_emacs): + * emacs.c (Fdump_emacs): + Update comments about what can be used in syms_* etc. + Call init_win32() when necessary. + Fix up MS Win dialog box in kill-buffer to actually work right. + [7]. + + * eval.c: + * eval.c (For): + * eval.c (Fand): + * eval.c (Fprogn): + * eval.c (Fprog1): + * eval.c (Fprog2): + * eval.c (FletX): + * eval.c (Flet): + * eval.c (condition_case_3): + * eval.c (Feval): + * eval.c (function_argcount): + * eval.c (funcall_lambda): + [1]. + + * eval.c (type_error): New. + * eval.c (maybe_type_error): New. + * eval.c (continuable_type_error): New. + * eval.c (maybe_continuable_type_error): New. + * eval.c (type_error_with_frob): New. + * eval.c (maybe_type_error_with_frob): New. + * eval.c (continuable_type_error_with_frob): New. + * eval.c (maybe_continuable_type_error_with_frob): New. + New functions for use with structured errors. + + * event-Xt.c: + * event-Xt.c (x_event_to_emacs_event): + Buttons are now modifiers too. + + * event-Xt.c (emacs_Xt_current_event_timestamp): + Implement new event method. + * event-Xt.c (reinit_vars_of_event_Xt): Set it. + + * event-msw.c: + * event-msw.c (ntpipe_shove_writer): [5]. + * event-msw.c (mswindows_enqueue_mouse_button_event): + * event-msw.c (mswindows_drain_windows_queue): + * event-msw.c (mswindows_wnd_proc): [7]. + * event-msw.c (mswindows_current_layout_has_AltGr): [5]. + * event-msw.c (mswindows_modifier_state): + Throughout: support new button modifiers. + + * event-msw.c (emacs_mswindows_current_event_timestamp): + Implement new event method. + * event-msw.c (reinit_vars_of_event_mswindows): Set it. + + * event-stream.c: + * event-stream.c (event_stream_current_event_timestamp): New. + * event-stream.c (maybe_kbd_translate): New functionality. + * event-stream.c (vars_of_event_stream): + Document new kbd-translate-table functionality. + + * event-stream.c (Fcurrent_event_timestamp): New. + New primitive for use in fabricated events. + * event-stream.c (syms_of_event_stream): [2]. Declare new primitive. + + * events-mod.h (XEMACS_MOD_BUTTON1): new button modifiers. + + * events.c: + * events.c (Fmake_event): + * events.c (WRONG_EVENT_TYPE_FOR_PROPERTY): + [1]. + [9]. + + * events.c (format_event_object): fix gcc warnings. + + * events.c (Fevent_timestamp): Document new primitives. + + * events.c (TIMESTAMP_HALFSPACE): New. + + * events.c (Fevent_timestamp_lessp): New. New primitive for comparing timestamps correctly (half-space algorithm). - * events.c (Fevent_modifier_bits): Doc fix. - - * events.c (Fevent_modifiers): Major doc addition. - * events.c (event_x_y_pixel_internal): Typo fix. - * events.c (syms_of_events): Declare new primitives. - - * events.h: - Update long comment for button modifiers, timestamps. - - * events.h (struct event_stream): - New current_event_timestamp method. - - * extents.c: - * extents.c (extent_in_region_p): - * extents.c (decode_extent): - * extents.c (Fset_extent_parent): - * extents.c (decode_map_extents_flags): - Fix gcc warnings. - [9]. - - * extents.c (struct extent_at_arg): - * extents.c (decode_extent_at_flag): - * extents.c (extent_at_mapper): - * extents.c (extent_at_bytind): - * extents.c (Fextent_at): Adapt to new lower-level interface. [9]. - * extents.c (Fextents_at): New primitive. [9]. - * extents.c (symbol_to_glyph_layout): [9]. - Support new primitive `extents-at'. - - - * extents.c (get_text_property_bytind): - extent_at_bytind has another arg. - [9]. - - * extents.c (syms_of_extents): New primitive. - - * file-coding.c (Fmake_coding_system): [1]. - * file-coding.c (subsidiary_coding_system): fix gcc warning - * file-coding.c (syms_of_file_coding): [2]. - - * fileio.c (Fexpand_file_name): - * fileio.c (Fsysnetunam): - * fileio.c (Ffile_exists_p): - * fileio.c (Ffile_executable_p): - * fileio.c (Fverify_visited_file_modtime): - Clean up GCPROing. - - * fileio.c (syms_of_fileio): [2]. - - * filelock.c (lock_file_1): - * filelock.c (current_lock_owner): - * filelock.c (lock_if_free): - * filelock.c (lock_file): - * filelock.c (unlock_file): - Clean up GCPROing. - - * fns.c (concat): Fix gcc warning. - - * fns.c (Fmember): - * fns.c (Fold_member): - * fns.c (Fmemq): - * fns.c (Fold_memq): - * fns.c (memq_no_quit): - * fns.c (Fassoc): - * fns.c (Fold_assoc): - * fns.c (Fassq): - * fns.c (Fold_assq): - * fns.c (assq_no_quit): - * fns.c (Frassoc): - * fns.c (Fold_rassoc): - * fns.c (Frassq): - * fns.c (Fold_rassq): - * fns.c (rassq_no_quit): - * fns.c (Fdelete): - * fns.c (Fold_delete): - * fns.c (Fdelq): - * fns.c (Fold_delq): - * fns.c (delq_no_quit): - * fns.c (Fremassoc): - * fns.c (Fremassq): - * fns.c (remassq_no_quit): - * fns.c (Fremrassoc): - * fns.c (Fremrassq): - * fns.c (remrassq_no_quit): - * fns.c (Freverse): - * fns.c (mapcar1): - [1]. - - * frame-msw.c (mswindows_init_frame_1): - * frame-msw.c (mswindows_delete_frame): - Register popups with dialog code so keyboard traversing works. - - * frame-tty.c (tty_raise_frame_no_select): [1]. - - * frame-x.c: - * frame-x.c (x_set_frame_text_value): - * frame-x.c (x_set_frame_properties): - * frame-x.c (x_create_widgets): - [7]. - - * frame.c: - * frame.c (Fmouse_pixel_position): Minor doc fixes. - - Macro like wrap_device. - - * general.c: - * general.c (SYMBOL): - * general.c (syms_of_general): - Major reorg. This is now just a wrapper and symbols themselves - are listed in general-slots.h. - - * glyphs-eimage.c (tiff_instantiate): Need cast to fix warning. - * glyphs-msw.c (mswindows_resource_instantiate): [5]. - - * glyphs-msw.c (mswindows_native_layout_instantiate): - Add DS_CONTROL so keyboard traversal will work. - - * glyphs-widget.c: - * glyphs-widget.c (syms_of_glyphs_widget): - Move some symbols to general-slots.h. - - * glyphs-x.c: - * glyphs-x.c (xbm_instantiate_1): - * glyphs-x.c (x_xbm_instantiate): - * glyphs-x.c (x_xface_instantiate): - * glyphs-x.c (autodetect_instantiate): - * glyphs-x.c (cursor_font_instantiate): - * glyphs-x.c (x_update_widget): - * glyphs-x.c (x_widget_instantiate): - * glyphs.c (bitmap_to_lisp_data): - * glyphs.c (pixmap_to_lisp_data): - [7]. - - * glyphs.c (syms_of_glyphs): - [2]. - - * gui-x.c: - * gui-x.c (print_widget_value): - * gui-x.c (menu_separator_style_and_to_external): - * gui-x.c (add_accel_and_to_external): - * gui-x.c (button_item_to_widget_value): - * gui-x.c (gui_items_to_widget_values_1): - * gui-x.c (gui_items_to_widget_values): - * gui-x.c (syms_of_gui_x): - * gui-x.c (vars_of_gui_x): - Mule-ize entire file. Move menu-no-selection-hook to gui.c. - [9]. - - * gui-x.h: - Muleize, prototype changes matching gui-x.c. - - * gui.c: - * gui.c (separator_string_p): - * gui.c (gui_item_add_keyval_pair): - * gui.c (make_gui_item_from_keywords_internal): - * gui.c (signal_too_long_error): - * gui.c (parse_gui_item_tree_item): - * gui.c (syms_of_gui): - * gui.c (vars_of_gui): - * gui.h: - menu-no-selection-hook moved here (used by MSWin). - Move some symbols to general-slots.h. - [6]. - [9]. - - * insdel.c (get_buffer_pos_char): - * insdel.c (get_buffer_range_char): - Add GC comments. - - * keymap.c (keymap_lookup_directly): - * keymap.c (keymap_store): - * keymap.c (ensure_meta_prefix_char_keymapp): - * keymap.c (describe_map): - * keymap.h: - Support new button modifiers. - - * lisp-disunion.h (XSETOBJ): - Rename make_obj to wrap_object. - - * lisp-union.h: - * lisp-union.h (make_int): - * lisp-union.h (make_char): - Support wrap_object. - - * lisp.h: - * lisp.h (LIST_LOOP): - * lisp.h (EXTERNAL_LIST_LOOP): - * lisp.h (LIST_LOOP_2): - * lisp.h (EXTERNAL_LIST_LOOP_1): - * lisp.h (EXTERNAL_LIST_LOOP_2): - * lisp.h (EXTERNAL_LIST_LOOP_3): - * lisp.h (EXTERNAL_LIST_LOOP_4_NO_DECLARE): - * lisp.h (PRIVATE_EXTERNAL_LIST_LOOP_6): - * lisp.h (GET_EXTERNAL_LIST_LENGTH): - * lisp.h (EXTERNAL_ALIST_LOOP_5): - * lisp.h (EXTERNAL_ALIST_LOOP_6): - * lisp.h (EXTERNAL_ALIST_LOOP_6_NO_DECLARE): - * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE): - * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_7): - * lisp.h (struct Lisp_Symbol): - * lisp.h (maybe_continuable_error_with_frob): - Fix up section comments. - Add new types for char to indicate usage. - Delete symbols auto-generated from general-slots.h. - Add prototypes for structured error functions. - Add long comments describing looping macros and change interface - so that lvalues are automatically declared. + * events.c (Fevent_modifier_bits): Doc fix. + + * events.c (Fevent_modifiers): Major doc addition. + * events.c (event_x_y_pixel_internal): Typo fix. + * events.c (syms_of_events): Declare new primitives. + + * events.h: + Update long comment for button modifiers, timestamps. + + * events.h (struct event_stream): + New current_event_timestamp method. + + * extents.c: + * extents.c (extent_in_region_p): + * extents.c (decode_extent): + * extents.c (Fset_extent_parent): + * extents.c (decode_map_extents_flags): + Fix gcc warnings. + [9]. + + * extents.c (struct extent_at_arg): + * extents.c (decode_extent_at_flag): + * extents.c (extent_at_mapper): + * extents.c (extent_at_bytind): + * extents.c (Fextent_at): Adapt to new lower-level interface. [9]. + * extents.c (Fextents_at): New primitive. [9]. + * extents.c (symbol_to_glyph_layout): [9]. + Support new primitive `extents-at'. + + + * extents.c (get_text_property_bytind): + extent_at_bytind has another arg. + [9]. + + * extents.c (syms_of_extents): New primitive. + + * file-coding.c (Fmake_coding_system): [1]. + * file-coding.c (subsidiary_coding_system): fix gcc warning + * file-coding.c (syms_of_file_coding): [2]. + + * fileio.c (Fexpand_file_name): + * fileio.c (Fsysnetunam): + * fileio.c (Ffile_exists_p): + * fileio.c (Ffile_executable_p): + * fileio.c (Fverify_visited_file_modtime): + Clean up GCPROing. + + * fileio.c (syms_of_fileio): [2]. + + * filelock.c (lock_file_1): + * filelock.c (current_lock_owner): + * filelock.c (lock_if_free): + * filelock.c (lock_file): + * filelock.c (unlock_file): + Clean up GCPROing. + + * fns.c (concat): Fix gcc warning. + + * fns.c (Fmember): + * fns.c (Fold_member): + * fns.c (Fmemq): + * fns.c (Fold_memq): + * fns.c (memq_no_quit): + * fns.c (Fassoc): + * fns.c (Fold_assoc): + * fns.c (Fassq): + * fns.c (Fold_assq): + * fns.c (assq_no_quit): + * fns.c (Frassoc): + * fns.c (Fold_rassoc): + * fns.c (Frassq): + * fns.c (Fold_rassq): + * fns.c (rassq_no_quit): + * fns.c (Fdelete): + * fns.c (Fold_delete): + * fns.c (Fdelq): + * fns.c (Fold_delq): + * fns.c (delq_no_quit): + * fns.c (Fremassoc): + * fns.c (Fremassq): + * fns.c (remassq_no_quit): + * fns.c (Fremrassoc): + * fns.c (Fremrassq): + * fns.c (remrassq_no_quit): + * fns.c (Freverse): + * fns.c (mapcar1): + [1]. + + * frame-msw.c (mswindows_init_frame_1): + * frame-msw.c (mswindows_delete_frame): + Register popups with dialog code so keyboard traversing works. + + * frame-tty.c (tty_raise_frame_no_select): [1]. + + * frame-x.c: + * frame-x.c (x_set_frame_text_value): + * frame-x.c (x_set_frame_properties): + * frame-x.c (x_create_widgets): + [7]. + + * frame.c: + * frame.c (Fmouse_pixel_position): Minor doc fixes. + + Macro like wrap_device. + + * general.c: + * general.c (SYMBOL): + * general.c (syms_of_general): + Major reorg. This is now just a wrapper and symbols themselves + are listed in general-slots.h. + + * glyphs-eimage.c (tiff_instantiate): Need cast to fix warning. + * glyphs-msw.c (mswindows_resource_instantiate): [5]. + + * glyphs-msw.c (mswindows_native_layout_instantiate): + Add DS_CONTROL so keyboard traversal will work. + + * glyphs-widget.c: + * glyphs-widget.c (syms_of_glyphs_widget): + Move some symbols to general-slots.h. + + * glyphs-x.c: + * glyphs-x.c (xbm_instantiate_1): + * glyphs-x.c (x_xbm_instantiate): + * glyphs-x.c (x_xface_instantiate): + * glyphs-x.c (autodetect_instantiate): + * glyphs-x.c (cursor_font_instantiate): + * glyphs-x.c (x_update_widget): + * glyphs-x.c (x_widget_instantiate): + * glyphs.c (bitmap_to_lisp_data): + * glyphs.c (pixmap_to_lisp_data): + [7]. + + * glyphs.c (syms_of_glyphs): + [2]. + + * gui-x.c: + * gui-x.c (print_widget_value): + * gui-x.c (menu_separator_style_and_to_external): + * gui-x.c (add_accel_and_to_external): + * gui-x.c (button_item_to_widget_value): + * gui-x.c (gui_items_to_widget_values_1): + * gui-x.c (gui_items_to_widget_values): + * gui-x.c (syms_of_gui_x): + * gui-x.c (vars_of_gui_x): + Mule-ize entire file. Move menu-no-selection-hook to gui.c. + [9]. + + * gui-x.h: + Muleize, prototype changes matching gui-x.c. + + * gui.c: + * gui.c (separator_string_p): + * gui.c (gui_item_add_keyval_pair): + * gui.c (make_gui_item_from_keywords_internal): + * gui.c (signal_too_long_error): + * gui.c (parse_gui_item_tree_item): + * gui.c (syms_of_gui): + * gui.c (vars_of_gui): + * gui.h: + menu-no-selection-hook moved here (used by MSWin). + Move some symbols to general-slots.h. + [6]. + [9]. + + * insdel.c (get_buffer_pos_char): + * insdel.c (get_buffer_range_char): + Add GC comments. + + * keymap.c (keymap_lookup_directly): + * keymap.c (keymap_store): + * keymap.c (ensure_meta_prefix_char_keymapp): + * keymap.c (describe_map): + * keymap.h: + Support new button modifiers. + + * lisp-disunion.h (XSETOBJ): + Rename make_obj to wrap_object. + + * lisp-union.h: + * lisp-union.h (make_int): + * lisp-union.h (make_char): + Support wrap_object. + + * lisp.h: + * lisp.h (LIST_LOOP): + * lisp.h (EXTERNAL_LIST_LOOP): + * lisp.h (LIST_LOOP_2): + * lisp.h (EXTERNAL_LIST_LOOP_1): + * lisp.h (EXTERNAL_LIST_LOOP_2): + * lisp.h (EXTERNAL_LIST_LOOP_3): + * lisp.h (EXTERNAL_LIST_LOOP_4_NO_DECLARE): + * lisp.h (PRIVATE_EXTERNAL_LIST_LOOP_6): + * lisp.h (GET_EXTERNAL_LIST_LENGTH): + * lisp.h (EXTERNAL_ALIST_LOOP_5): + * lisp.h (EXTERNAL_ALIST_LOOP_6): + * lisp.h (EXTERNAL_ALIST_LOOP_6_NO_DECLARE): + * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE): + * lisp.h (EXTERNAL_PROPERTY_LIST_LOOP_7): + * lisp.h (struct Lisp_Symbol): + * lisp.h (maybe_continuable_error_with_frob): + Fix up section comments. + Add new types for char to indicate usage. + Delete symbols auto-generated from general-slots.h. + Add prototypes for structured error functions. + Add long comments describing looping macros and change interface + so that lvalues are automatically declared. * events.h: Update long comment for button modifiers, timestamps. @@ -29237,7 +30266,7 @@ * alloc.c (pdump_reloc_one): Minor cleanups. - * console-msw.c: + * console-msw.c: * console-msw.c (GetConsoleHwnd): * console-msw.c (msw_hide_console): * console-msw.c (msw_show_console): @@ -31264,14 +32293,14 @@ should be extended. Assumption that .bss section should be outside the PT_LOADable - segment. On IRIX with version 6.2 and above, .bss (or .sbss, if - it's present) is inside the 'data' segment. This would fail the - test which was used to find a segment to grow and cover new - heap. Instead of this assumption, I created another one - on IRIX - the segment to grow should start below .bss and it's address - should extent above the end of .bss. Once this segment is - identified, it's grown to accommodate the new heap and new - zero-length .bss section is added at the end of .data2. + segment. On IRIX with version 6.2 and above, .bss (or .sbss, if + it's present) is inside the 'data' segment. This would fail the + test which was used to find a segment to grow and cover new + heap. Instead of this assumption, I created another one - on IRIX + the segment to grow should start below .bss and it's address + should extent above the end of .bss. Once this segment is + identified, it's grown to accommodate the new heap and new + zero-length .bss section is added at the end of .data2. 2000-01-25 Martin Buchholz @@ -32148,12 +33177,12 @@ * configure.in: * configure.usage: - Clean up Athena widget support: + Clean up Athena widget support: - Add `with-athena' to select a variant. - Remove all `athena3d' options. - Robust detection of Athena libraries and headers. - - Refuse to build with mismatched library and headers. - - Only build a 3d Athena if the user asks for it. + - Refuse to build with mismatched library and headers. + - Only build a 3d Athena if the user asks for it. 1999-12-21 Andy Piper @@ -32599,27 +33628,27 @@ 1999-10-25 Kazuyuki IENAGA - * input-method-xlib.c: Added new lisp object Qxim_xlib. - New macro xim_warn(str), xim_warn1(fmt,str) and xim_info(str). - All the valid stderr_out were changed to those macros. - (IMDestroyCallback): Don't test the XIC if the frame is not X - frame. - (IMInstantiateCallback): Treat the client_data as "device" not - "frame" because the caller changed from frame to device. - Here initializes XIM and activates XICs for each frame which - doesn't have XIC. - (XIM_init_device): Register the XIM instantiation callback which - had been performed by XIM_init_frame() before. - (XIM_delete_frame): Added a test for the XIM before clearing XIC. - (XIM_init_frame): Placed an actual code for XIC activation which - was moved from IMInstantiateCallback. - (syms_of_input_method_xlib): New function which includes a symbol - Qxim_xlib that uses in emacs.c. - - * emacs.c: Added a function entry "syms_of_input_method_xlib" for - input_method_xlib. - - * symsinit.h: Added a declaration of "syms_of_input_method_xlib". + * input-method-xlib.c: Added new lisp object Qxim_xlib. + New macro xim_warn(str), xim_warn1(fmt,str) and xim_info(str). + All the valid stderr_out were changed to those macros. + (IMDestroyCallback): Don't test the XIC if the frame is not X + frame. + (IMInstantiateCallback): Treat the client_data as "device" not + "frame" because the caller changed from frame to device. + Here initializes XIM and activates XICs for each frame which + doesn't have XIC. + (XIM_init_device): Register the XIM instantiation callback which + had been performed by XIM_init_frame() before. + (XIM_delete_frame): Added a test for the XIM before clearing XIC. + (XIM_init_frame): Placed an actual code for XIC activation which + was moved from IMInstantiateCallback. + (syms_of_input_method_xlib): New function which includes a symbol + Qxim_xlib that uses in emacs.c. + + * emacs.c: Added a function entry "syms_of_input_method_xlib" for + input_method_xlib. + + * symsinit.h: Added a declaration of "syms_of_input_method_xlib". 1999-11-05 Robert Pluim @@ -32690,7 +33719,7 @@ * alloc.c (reinit_alloc_once_early): Move purify_flag init... * emacs.c (main_1): ...here, to get the correct value even with - the portable dumper. + the portable dumper. 1999-11-17 Martin Buchholz @@ -32765,7 +33794,7 @@ 1999-10-30 Olivier Galibert * alloc.c (pdump_dump_rtables): Don't forget to dump the last - registered type. + registered type. (pdump): Ditto. 1999-10-25 Olivier Galibert @@ -32799,25 +33828,25 @@ * bufslots.h: Add defines with first and last slot names. * buffer.c (common_init_complex_vars_of_buffer): Renamed from - reinit_complex_vars_of_buffer + reinit_complex_vars_of_buffer (reinit_complex_vars_of_buffer): Reset the slots to the dumped - value. + value. (complex_vars_of_buffer): Dump the slots values. * console.c (common_init_complex_vars_of_console): Renamed from - reinit_complex_vars_of_console + reinit_complex_vars_of_console (reinit_complex_vars_of_console): Reset the slots to the dumped - value. + value. (complex_vars_of_console): Dump the slots values. * alloc.c: Rename reloc_table to pdump_reloc_table, rt_list to - pdump_rt_list and move them at the beginning of the file. + pdump_rt_list and move them at the beginning of the file. (gc_sweep): Unmark pdumped objects after the sweep phase. (pdump_dump_rtables): Change a bare 256 to - last_lrecord_type_index_assigned. Add a separator between the - adresses or lrecords and the ones of C structs in the dump file. + last_lrecord_type_index_assigned. Add a separator between the + adresses or lrecords and the ones of C structs in the dump file. (pdump_load): Cope with the new separator and the renamings. Stop - looking for the hash tables list after it has been found (duh!). + looking for the hash tables list after it has been found (duh!). 1999-10-24 Robert Bihlmeyer @@ -32850,18 +33879,18 @@ 1999-10-20 Jan Vroonhof - * unexelf.c (unexec): Only copy the global offset - table from memory on sgi machines. + * unexelf.c (unexec): Only copy the global offset + table from memory on sgi machines. 1999-08-13 Alexandre Oliva , Vin Shelton - * unexelf.c: Enable GNU/Linux/alpha to build with gcc 2.95 by - adding support for an sbss section. Get IRIX 5.2 to build using - unexelf.c. - - * m/iris4d.h: Use unexelf.o for unexec. - - * m/iris5d.h: Use unexelf.o for unexec. + * unexelf.c: Enable GNU/Linux/alpha to build with gcc 2.95 by + adding support for an sbss section. Get IRIX 5.2 to build using + unexelf.c. + + * m/iris4d.h: Use unexelf.o for unexec. + + * m/iris5d.h: Use unexelf.o for unexec. 1999-10-24 Jan Vroonhof @@ -32874,7 +33903,7 @@ 1999-08-25 Jonathan Marten * window.c (window_truncation_on): Always return 0 for minibuffer - windows, to enable auto scrolling. + windows, to enable auto scrolling. 1999-10-24 Neal Becker * process.h: Unix98 PTY support @@ -32887,28 +33916,28 @@ 1999-08-19 Stephen Tse * process-unix.c (unix_open_network_stream): Add udp network - support; rename variable Qtcpip to Qtcp, parameter family to - protocol for consistency with Qudp. + support; rename variable Qtcpip to Qtcp, parameter family to + protocol for consistency with Qudp. * process-nt.c (nt_open_network_stream): Rename variable Qtcpip to - Qtcp, parameter family to protocol for consistency with Qudp. + Qtcp, parameter family to protocol for consistency with Qudp. * process.c (global_variables): Add a new variable Qudp for udp - network support; rename variable Qtcpip to Qtcp for consistency - with Qudp. + network support; rename variable Qtcpip to Qtcp for consistency + with Qudp. (Fopen_network_stream_internal): Rename parameter FAMILY to - PROTOCOL for consistency; fix a minor typo and add an explanation - in docstring for udp programming. + PROTOCOL for consistency; fix a minor typo and add an explanation + in docstring for udp programming. (Fopen_multicast_group_internal): Fix a minor typo in docstring. (syms_of_process): Add a new variable Qudp for udp network - support; rename variable Qtcpip to Qtcp for consistency with Qudp. + support; rename variable Qtcpip to Qtcp for consistency with Qudp. * process.h (extern_variables): Add a new variable Qudp for udp - network support; rename variable Qtcpip to Qtcp for consistency - with Qudp. + network support; rename variable Qtcpip to Qtcp for consistency + with Qudp. * procimpl.h: Add a new variable Qudp for udp network support; - rename variable Qtcpip to Qtcp for consistency with Qudp. + rename variable Qtcpip to Qtcp for consistency with Qudp. (struct process_methods): Rename parameter family to protocol. @@ -32927,29 +33956,29 @@ * alloc.c: Removed hash_next linked list pointer. * *.c *.h: Removed markobj and mark_object parameters, removed GC_ - and XGC macros. + and XGC macros. 1999-10-14 Andy Piper * redisplay-x.c (x_output_shadows): fix dodgy maths for border - calculations. + calculations. * gutter.c (output_gutter): be more accurate about the area to be - cleared since X seems to manage to do the clear after drawing the - border. + cleared since X seems to manage to do the clear after drawing the + border. * redisplay.h (RESET_CHANGED_FLAGS): new macro for setting - redisplay flags as a group. + redisplay flags as a group. (RESET_CHANGED_SET_FLAGS): ditto. (CLASS_RESET_CHANGED_FLAGS): ditto. (GLOBAL_RESET_CHANGED_FLAGS): ditto. (REDISPLAY_FLAGS_CHANGEDP): new macro for testing redisplay flags - as a group. + as a group. (CLASS_REDISPLAY_FLAGS_CHANGEDP): ditto. (GLOBAL_REDISPLAY_FLAGS_CHANGEDP): ditto. * redisplay.c (redisplay_frame): use CLASS_RESET_CHANGED_FLAGS - instead of setting flags individually. + instead of setting flags individually. (redisplay_device): ditto CLASS_REDISPLAY_FLAGS_CHANGEDP. (redisplay_device): ditto. (redisplay_device): ditto CLASS_RESET_CHANGED_FLAGS. @@ -32962,50 +33991,50 @@ (x_output_blank): ditto. * redisplay-output.c (redisplay_output_display_block): don't unmap - subwindows in case layout optimization can avoid it. + subwindows in case layout optimization can avoid it. (redisplay_output_subwindow): unmap subwindows in the area. (redisplay_output_layout): optimize the output of layouts - only - output glyphs that have changed if nothing else of redisplay - significance has occurred. + output glyphs that have changed if nothing else of redisplay + significance has occurred. (redisplay_output_pixmap): change args to - redisplay_clear_clipped_region. + redisplay_clear_clipped_region. (redisplay_clear_clipped_region): allow the clipped region to be - cleared of all subwindows except the one passed in. + cleared of all subwindows except the one passed in. * redisplay-msw.c (mswindows_output_blank): unmap subwindows in - the area. + the area. (mswindows_output_cursor): ditto. (mswindows_output_string): ditto. * gutter.c (calculate_gutter_size): if the window buffer is nil - then don't continue. + then don't continue. (update_frame_gutters): be more lenient about when we actually - update the gutter. Layout optimization makes this - non-costly. Cache redisplay flags that we want to temporarily - ignore. + update the gutter. Layout optimization makes this + non-costly. Cache redisplay flags that we want to temporarily + ignore. * glyphs.c (Fglyph_animated_timeout_handler): handle image - specific timeouts rather than iterating over the instance cache. + specific timeouts rather than iterating over the instance cache. (glyph_animated_timeout_mapper): deleted. (add_glyph_animated_timeout): use a weak list to hold onto the - image so that it can be GC'ed. + image so that it can be GC'ed. (disable_glyph_animated_timeout): disable a specific timeout. (vars_of_glyphs): disable-animated-pixmaps is a new boolean for - controlling whether pixmaps are animated or not. + controlling whether pixmaps are animated or not. * glyphs-msw.c (mswindows_finalize_image_instance): make sure the image timeout gets disabled when the image gets freed. * glyphs-eimage.c (gif_instantiate): remove meaningless - comment. Cope with timeouts specified in the gif extension block. + comment. Cope with timeouts specified in the gif extension block. * event-msw.c (vars_of_event_mswindows): new variable - mswindows-meta-activates-menu. + mswindows-meta-activates-menu. (mswindows_wnd_proc): only goto defproc with VK_MENU if the user - wants it. + wants it. * glyphs-x.c (x_finalize_image_instance): delete mask first so - that we can compare with image. + that we can compare with image. 1999-10-14 Jonathan Harris @@ -33073,29 +34102,29 @@ * lrecord.h (XD_DYNARR_DESC): Introduce XD_INT_RESET and use it. * glyphs.c: Add the ii_keyword_entry and related descriptions. - Fix the image_instantiator_methods one. + Fix the image_instantiator_methods one. * file-coding.c: Plonk all data that needs to be dumped in a - dynamically allocated structure. + dynamically allocated structure. * extents.c (reinit_vars_of_extents): Extracted from - vars_of_extents. + vars_of_extents. * event-stream.c (vars_of_event_stream): Don't staticpro when - pdump_wire is enough. + pdump_wire is enough. * event-msw.c (reinit_vars_of_event_mswindows): Extracted from - vars_of_event_mswindows. + vars_of_event_mswindows. * event-Xt.c (reinit_vars_of_event_Xt): Extracted from - vars_of_event_Xt. + vars_of_event_Xt. * eval.c (vars_of_eval): Don't staticpro when pdump_wire is enough. * emacs.c (main_1): Added some reinit calls. * device-x.c (reinit_console_type_create_device_x): Extracted from - console_type_create_device_x. + console_type_create_device_x. * console.h: Declare the console_type_entry_dynarr description. @@ -33108,48 +34137,48 @@ * symsinit.h: Updated declarations, see other ChangeLog entries. * minibuf.c (reinit_complex_vars_of_minibuf): Extracted from - complex_vars_of_minibuf. + complex_vars_of_minibuf. * lrecord.h: Removed XD_PARENT_INDIRECT (unused and - unimplemented), added XD_LO_LINK. + unimplemented), added XD_LO_LINK. * lisp.h (pdump_wire_list): Add declaration. * glyphs.h (INITIALIZE_DEVICE_IIFORMAT): Fix bug found by Andy. (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT): Fix stupid bug. (REINITIALIZE_IMAGE_INSTANTIATOR_FORMAT): Remove, useless once the - stupid bug fixed. + stupid bug fixed. * glyphs.c (reinit_image_instantiator_format_create): Remove. * glyphs-x.c (reinit_image_instantiator_format_create_glyphs_x): - Remove. + Remove. * glyphs-widget.c - (reinit_image_instantiator_format_create_glyphs_widget): Remove. + (reinit_image_instantiator_format_create_glyphs_widget): Remove. * glyphs-msw.c - (reinit_image_instantiator_format_create_glyphs_mswindows): - Remove. + (reinit_image_instantiator_format_create_glyphs_mswindows): + Remove. * glyphs-eimage.c - (reinit_image_instantiator_format_create_glyphs_eimage): Remove. + (reinit_image_instantiator_format_create_glyphs_eimage): Remove. * frame.c (Fmake_frame): Don't reset the face cache when using the - stream device. + stream device. * file-coding.c: Dumped the_codesys_prop_dynarr and added all - relevant descriptions. + relevant descriptions. * events.c (reinit_vars_of_events): Extracted from vars_of_events. * eval.c: The subr is _not_ a lcrecord. * emacs.c (main_1): Call vars_of_specifier early before any - specifier creation (e.g in vars_of_glyphs, at least). Remove the - useless reinit_image_instantiator_format*. Add - reinit_vars_of_events and reinit_complex_vars_of_minibuf. Add - calls to lstream_type_create* and process_type_create*. + specifier creation (e.g in vars_of_glyphs, at least). Remove the + useless reinit_image_instantiator_format*. Add + reinit_vars_of_events and reinit_complex_vars_of_minibuf. Add + calls to lstream_type_create* and process_type_create*. * elhash.c: Dump Vall_weak_hash_tables correctly. @@ -33158,28 +34187,28 @@ * console.c: Fix description. * console-stream.c (init_console_stream): Do initializations - correctly in the pdump case. + correctly in the pdump case. * chartab.c: Fix description. Dump Vall_syntax_tables correctly. (Fcopy_char_table): Link into Vall_syntax_tables. * alloc.c (pdump_wire_list): Added. (Fgarbage_collect): Fix loop in stats couting missing the last - lrecord type. + lrecord type. (pdump_register_sub): Added XD_LO_LINK. (pdump_dump_data): Ditto. Fixed XD_LO_RESET_NIL forgttting the - counter. + counter. (pdump_reloc_one): Ditto. (pdump_scan_by_alignement): Use last_lrecord_type_index_assigned - instead of 256. + instead of 256. (pdump_dump_wired): Added lists. (pdump): Use last_lrecord_type_index_assigned instead of 256. - Dump last_lrecord_type_index_assigned value. Fix minor bugs. + Dump last_lrecord_type_index_assigned value. Fix minor bugs. 1999-10-07 Andy Piper * glyphs-msw.c (mswindows_finalize_image_instance): zero out - bitmap slices. + bitmap slices. * glyphs-x.c (x_finalize_image_instance): fix FMW problem. @@ -33194,37 +34223,37 @@ 1999-10-06 Andy Piper * glyphs.c (Fset_image_instance_property): mark glyphs as dirty - after setting an image instance property. + after setting an image instance property. 1999-10-05 Andy Piper * gutter.c (update_frame_gutters): output gutters if - windows_changed is set. This is the only way of catching changes - in selected window which obviously can affect the specifiers. + windows_changed is set. This is the only way of catching changes + in selected window which obviously can affect the specifiers. * redisplay.c: new state flags, subwindows_state_changed and - subwindows_state_changed set. + subwindows_state_changed set. (redisplay_window): use them. (redisplay_device): ditto. (redisplay_without_hooks): ditto. (redisplay_frame): ditto. Reset subwindow cachels if - subwindows_changed is set. + subwindows_changed is set. (redisplay_window): call mark_glyph_cachels_as_clean after - redisplaying. + redisplaying. * redisplay-x.c (x_output_x_pixmap): select correct - pixmap image for display depending on the currently selected - slice. + pixmap image for display depending on the currently selected + slice. * redisplay-output.c (compare_runes): check dirtiness when - checking RUNE_DGLYPH runes. + checking RUNE_DGLYPH runes. (compare_display_blocks): relax invalidation of display blocks - since we can now detect whether individual glyphs have changed or - not. + since we can now detect whether individual glyphs have changed or + not. * redisplay-msw.c (mswindows_output_dibitmap): select correct - bitmap image for display depending on the currently selected - slice. + bitmap image for display depending on the currently selected + slice. * glyphs.h (struct Lisp_Image_Instance): add a dirty flag. (IMAGE_INSTANCE_DIRTYP): new macro. @@ -33237,17 +34266,17 @@ (struct glyph_cachel): add a dirty flag. * glyphs.c (update_frame_subwindows): Don't update on - glyphs_changed. + glyphs_changed. (glyph_animated_timeout_mapper): new function. Map over the - instance cache lookinng for animated images to update. + instance cache lookinng for animated images to update. (Fglyph_animated_timeout_handler): new function. Lisp callback for - handling animated image timeout events. + handling animated image timeout events. (disable_glyph_animated_timeout): new function. Add the animated - image timeout. + image timeout. (disable_glyph_animated_timeout): new function. Remove the - animated image timeout. + animated image timeout. (syms_of_glyphs): initialize Qglyph_animated_timeout_handler and - friends. + friends. (vars_of_glyphs): initialize Vglyph_animated_ticker. (image_instance_equal): add the currently displayed slice. (image_instance_hash): ditto. @@ -33255,16 +34284,16 @@ (glyph_width): rename glyph -> glyph_or_image. (glyph_height_internal): ditto. (glyph_dirty_p): new function. Determine whether the image - instance in the domain and/or glyph is dirty. + instance in the domain and/or glyph is dirty. (set_glyph_dirty_p): set the dirtiness. (update_glyph_cachel_data): take dirtiness into account. Pass the - image instance we are interested in to glyph_width and friends. + image instance we are interested in to glyph_width and friends. (get_glyph_cachel_index): make non-static. Always call - update_glyph_cachel_data. + update_glyph_cachel_data. (mark_glyph_cachels_as_not_updated): meaningless formatting - change. + change. (mark_glyph_cachels_as_clean): new function. Clean dirtiness from - glyph cachels. + glyph cachels. * glyphs-x.h (struct x_image_instance_data): change pixmap to a list of pixmaps. @@ -33274,93 +34303,93 @@ (XIMAGE_INSTANCE_X_PIXMAP_SLICES): ditto. * glyphs-x.c (x_finalize_image_instance): make sure multi pixmap - images get deleted properly. + images get deleted properly. (init_image_instance_from_x_image): add slices paramater and use - it to initialize x_image_instance_data correctly. + it to initialize x_image_instance_data correctly. (image_instance_add_x_image): new function. Add new pixmaps to our - set of instantiated pixmaps for an image. Used by animated images. + set of instantiated pixmaps for an image. Used by animated images. (x_init_image_instance_from_eimage): add a slices - parameter. Instantiate all images from the eimage. + parameter. Instantiate all images from the eimage. (x_xpm_instantiate): update use of - init_image_instance_from_x_image. + init_image_instance_from_x_image. (init_image_instance_from_xbm_inline): ditto. (x_initialize_pixmap_image_instance): add slices paramater and use - it to allocate x_image_instance_data correctly. + it to allocate x_image_instance_data correctly. * glyphs-msw.h (struct mswindows_image_instance_data): change - bitmap to a list of bitmaps. + bitmap to a list of bitmaps. (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE): new macro. (IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES): ditto. (XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICE): ditto. (XIMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES): ditto. * glyphs-msw.c (init_image_instance_from_dibitmap): add slices - paramater and use it to initialize mswindows_image_instance_data - correctly. + paramater and use it to initialize mswindows_image_instance_data + correctly. (image_instance_add_dibitmap): new function. Add new bitmaps to - our set of instantiated bitmaps for an image. Used by animated - images. + our set of instantiated bitmaps for an image. Used by animated + images. (mswindows_init_image_instance_from_eimage): add a slices - parameter. Instantiate all images from the eimage. + parameter. Instantiate all images from the eimage. (mswindows_xpm_instantiate): update use of - init_image_instance_from_dibitmap. + init_image_instance_from_dibitmap. (bmp_instantiate): ditto. (init_image_instance_from_xbm_inline): ditto. (mswindows_finalize_image_instance): make sure all the bitmap - slices get deleted. + slices get deleted. (mswindows_initialize_dibitmap_image_instance): add slices - paramater and use it to allocate mswindows_image_instance_data - correctly. + paramater and use it to allocate mswindows_image_instance_data + correctly. * glyphs-eimage.c (jpeg_instantiate): give extra paramter to - init_image_instance_from_eimage. + init_image_instance_from_eimage. (png_instantiate): ditto. (tiff_instantiate): ditto. (gif_instantiate): allocate bitmaps for all gif slices not just - the first one. + the first one. * device.h (struct device): add subwindows_state_changed flag. (MARK_DEVICE_SUBWINDOWS_STATE_CHANGED): new macro. (MARK_DEVICE_FRAMES_GLYPHS_CHANGED): ditto. * console.h (struct console_methods): add a slice parameter to - init_image_instance_from_eimage_method. + init_image_instance_from_eimage_method. * redisplay.c (create_string_text_block): Allow buffer to be nil - without crashing. + without crashing. 1999-09-24 Andy Piper * glyphs-x.c: only include gui-x.h if we are building with - widgets. + widgets. * gui-x.c (vars_of_gui_x): only set popup_up_p if we have popups. 1999-09-28 Lee Kindness * objects-x.c (allocate_nearest_color): will return 0 (failure) - when the colormap is full and the color it has computed to be the - 'nearest' has been allocated read/write. + when the colormap is full and the color it has computed to be the + 'nearest' has been allocated read/write. 1999-10-02 Olivier Galibert * search.c (reinit_vars_of_search): Reinit the search cache - correctly. + correctly. * elhash.h: Make the description visible. Declare - resize_hash_table. + resize_hash_table. * elhash.c (resize_hash_table): Extracted from enlarge_hash_table - to generalize the hash table reorganization. + to generalize the hash table reorganization. (reorganize_hash_table): Added. (enlarge_hash_table): Uses resize_has_table. * casetab.c (complex_vars_of_casetab): staticpro the mule mirror - tables. + tables. * alloc.c: Add correct management of blocks of structures. - Reorganize hash tables at reload since the hash values can change - with the pointers. + Reorganize hash tables at reload since the hash values can change + with the pointers. 1999-10-01 Olivier Galibert @@ -33374,8 +34403,8 @@ (pdump): Support it * glyphs-msw.c - (reinit_image_instantiator_format_create_glyphs_mswindows): Fix - macro calls. + (reinit_image_instantiator_format_create_glyphs_mswindows): Fix + macro calls. 1999-09-28 Olivier Galibert @@ -33384,72 +34413,72 @@ * symeval.h: Added defsymbol_nodump declaration. * symbols.c (find_symbol_value): Lame attempt at making the - startup go further. + startup go further. (defsymbol_nodump): Added. * mule-charset.c: Collapsed global lisp objects arrays in one - dumpable structure. + dumpable structure. * lrecord.h: Added some flags. * lisp.h: Added dumped flag to dynarrs. Added dumpstruct - declaration. + declaration. * glyphs.h (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM): Don't - staticpro dynamic variables. + staticpro dynamic variables. * glyphs.c (reinit_specifier_type_create_image): Added. (image_instantiator_format_create): Dump image instantiator format - dynarr. + dynarr. (reinit_image_instantiator_format_create): Added. * emacs.c (main_1): Added reinits calls. * dynarr.c: Protect dumped dynarrays from going berzek in free or - realloc. + realloc. * specifier.h (INITIALIZE_SPECIFIER_TYPE): Don't staticpro dynamic - variables. + variables. * specifier.c (specifier_type_create): Dump the specifier type - dynarr. + dynarr. (reinit_specifier_type_create): Added. * console.h (INITIALIZE_CONSOLE_TYPE): Don't staticpro dynamic - variables. + variables. * console.c (console_type_create): Dump the console type dynarr. (reinit_vars_of_console): Extracted from vars_of_console. (reinit_complex_vars_of_console): Extracted from - complex_vars_of_console + complex_vars_of_console * window.c (reinit_vars_of_window): Extracted from vars_of_window. * toolbar.c (reinit_specifier_type_create_toolbar): Added. * search.c (reinit_vars_of_search): Extracted from vars_of_search. * objects.c (reinit_specifier_type_create_objects): Added. (reinit_vars_of_objects): Extracted from vars_of_objects. * lstream.c (reinit_vars_of_lstream): Extracted from - vars_of_lstream. + vars_of_lstream. * lread.c (reinit_vars_of_lread): Extracted from vars_of_lread. * gutter.c (reinit_specifier_type_create_gutter): Added. * glyphs-x.c (reinit_image_instantiator_format_create_glyphs_x): - Added. + Added. * glyphs-widget.c - (reinit_image_instantiator_format_create_glyphs_widget): Added + (reinit_image_instantiator_format_create_glyphs_widget): Added * glyphs-msw.c - (reinit_image_instantiator_format_create_glyphs_mswindows): Added. + (reinit_image_instantiator_format_create_glyphs_mswindows): Added. * glyphs-eimage.c - (reinit_image_instantiator_format_create_glyphs_eimage): Added. + (reinit_image_instantiator_format_create_glyphs_eimage): Added. * event-stream.c (reinit_vars_of_event_stream): Extracted from - vars_of_event_stream + vars_of_event_stream * eval.c (reinit_vars_of_eval): Extracted from vars_of_eval. * device.c (reinit_vars_of_device): Extracted from vars_of_device. * console-x.c (reinit_console_type_create_x): Added. * console-tty.c (reinit_console_type_create_tty): Added * console-stream.c (reinit_console_type_create_stream): Added. (init_console_stream): If PDUMP, always reinitialise basic - devices. + devices. * console-msw.c (reinit_console_type_create_mswindows): Added. * buffer.c (reinit_vars_of_buffer): Extracted from - init_vars_of_buffer. + init_vars_of_buffer. (reinit_complex_vars_of_buffer): Extracted from - complex_vars_of_buffer + complex_vars_of_buffer * alloc.c: Further with the portable dumping, the revenge. (dumpstruct): Added. @@ -33573,12 +34602,12 @@ 1999-09-24 Andy Piper * redisplay-output.c (output_display_line): only clear the borders - if we are not displaying the gutter. + if we are not displaying the gutter. 1999-09-24 Jan Vroonhof * frame-x.c (x_any_window_to_frame): Let Xt find the widget and - then use x_any_widget_or_parent_to_frame(). + then use x_any_widget_or_parent_to_frame(). (x_find_frame_for_window): remove special cases. 1999-09-24 Andy Piper @@ -33717,25 +34746,25 @@ 1999-09-22 Andy Piper * redisplay.c (redisplay_frame): reset the gutter display lines - when we reset the subwindows. + when we reset the subwindows. * gutter.c (reset_gutter_display_lines): new function. * window.c (Flast_nonminibuf_window): new function equivalent to - FRAME_LAST_NONMINIBUF_WINDOW (). + FRAME_LAST_NONMINIBUF_WINDOW (). (syms_of_window): declare it. * redisplay.c (create_string_text_block): don't add bogus eol - markers to gutter display lines. + markers to gutter display lines. * glyphs.c (reset_subwindow_cachels): make sure we unmap - subwindows using unmap_subwindow so that expose events get - registered correctly. + subwindows using unmap_subwindow so that expose events get + registered correctly. * window.c (window_scroll): use Vwindow_pixel_scroll_increment to - determine how much to scroll the window. + determine how much to scroll the window. (vars_of_window): Vwindow_pixel_scroll_increment is a new - variable. + variable. 1999-09-20 Robert Pluim @@ -33749,19 +34778,19 @@ 1999-09-19 Andy Piper * glyphs.c (update_frame_subwindows): update if faces have - changed. + changed. * glyphs-x.c (x_widget_instantiate): create the clip widget using - lwlib rather than directly. + lwlib rather than directly. (x_finalize_image_instance): delete the clip widget using lwlib. (x_update_subwindow): update widget faces. (update_widget_face): new function for updating the face - properties of a widget. + properties of a widget. (x_widget_set_property): update widget faces. * lwlib-Xlw.c (xlw_create_clip_window): new function. We need to - manage the clip widgets using lwlib so that we can delete them in - a safe manner. + manage the clip widgets using lwlib so that we can delete them in + a safe manner. 1999-09-16 Martin Buchholz @@ -33784,64 +34813,64 @@ 1999-09-16 Andy Piper * redisplay-output.c (redisplay_output_subwindow): clip subwindows - that don't completely fit on-screen rather than just unmapping - them. + that don't completely fit on-screen rather than just unmapping + them. * glyphs.h: change signature of map_subwindow. * glyphs.c (map_subwindow): add display_glyph_area to the - signature. make sure the mapped area saved in the subwindow_cachel - reflects this. + signature. make sure the mapped area saved in the subwindow_cachel + reflects this. (Fforce_subwindow_map): make a no-op. I don't think this does - anything useful. + anything useful. * glyphs-x.h (struct x_subwindow_data): save the Display rather - than the Screen. Add a clipwindow and clipwidget handle. + than the Screen. Add a clipwindow and clipwidget handle. (IMAGE_INSTANCE_X_CLIPWINDOW): new accessor. (IMAGE_INSTANCE_X_CLIPWIDGET): ditto. (XIMAGE_INSTANCE_X_CLIPWIDGET): ditto. (XIMAGE_INSTANCE_X_CLIPWINDOW): ditto. * glyphs-x.c (x_finalize_image_instance): destroy the clipwidget - as well as the widget itself. + as well as the widget itself. (x_unmap_subwindow): unmap the clipwindow and clipwidget rather - than the widgets and subwindows themselves. move the widget inside - the clipwidget. + than the widgets and subwindows themselves. move the widget inside + the clipwidget. (x_subwindow_instantiate): hold onto the Display rather than the - Screen. allocate a clipwindow to put the subwindow inside. + Screen. allocate a clipwindow to put the subwindow inside. (x_resize_subwindow): use saved Display directly. (x_widget_instantiate): allocate a clipwidget of type EmacsManager - to put widgets inside. + to put widgets inside. * glyphs-widget.c: remove group stuff. * glyphs-msw.h (struct mswindows_subwindow_data): new structure to - hold the clipwindow. + hold the clipwindow. (IMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW): new accessor. (XIMAGE_INSTANCE_MSWINDOWS_CLIPWINDOW): ditto. * glyphs-msw.c: remove group stuff. (mswindows_finalize_image_instance): destroy clipwindow as well as - the widget itself. + the widget itself. (mswindows_unmap_subwindow): unmap the clipwindow rather than the - widget. + widget. (mswindows_map_subwindow): ditto. move the widget within the - clipwindow. + clipwindow. (mswindows_subwindow_instantiate): allocate and initialize - mswindows_subwindow_data. allocate a clipwindow with the subwindow - as a child. + mswindows_subwindow_data. allocate a clipwindow with the subwindow + as a child. (mswindows_widget_instantiate): ditto. (mswindows_control_wnd_proc): new function that allows us to - propagate events from the widget to the main windows control loop. + propagate events from the widget to the main windows control loop. * device-msw.c (mswindows_init_device): register new widget clip window - class. + class. * console.h (struct console_methods): add display_glyph_area to - map_window. + map_window. * console-msw.h: declare new window class and wnd proc for - widgets. + widgets. 1999-09-14 Martin Buchholz @@ -33908,47 +34937,47 @@ 1999-09-13 Mike McEwan * redisplay-x.c (x_output_vertical_divider): make sure - shadow_thickness is positive. + shadow_thickness is positive. 1999-09-10 Julian Back * process-nt.c (nt_create_process): fixup to cope with - Vprocess_environment. + Vprocess_environment. 1999-09-02 Andy Piper * redisplay-output.c (redisplay_output_layout): call output - routines with clear_clip false. output layout borders with text - correctly. + routines with clear_clip false. output layout borders with text + correctly. * redisplay-msw.c (mswindows_output_blank): call output routines - with clear_clip true. + with clear_clip true. (mswindows_output_string): ditto. (mswindows_output_display_block): ditto. * redisplay-x.c (x_output_display_block): call output routines - with clear_clip true. + with clear_clip true. * redisplay.h: fix output routines for clear_clip parameter. * redisplay-output.c (redisplay_output_layout): cope with glyphs - in the border. + in the border. * glyphs-widget.c (layout_instantiate): deal with border glyphs. (check_valid_glyph_or_instantiator): renamed from - check_valid_glyph_or_image. + check_valid_glyph_or_image. (check_valid_border): allow glyphs or their instantiators. (check_valid_glyph_or_instantiator_list): renamed from - check_valid_glyph_or_image_list, + check_valid_glyph_or_image_list, (glyph_instantiator_to_glyph): new function. make sure a glyph is - a glyph and not an instantiator. + a glyph and not an instantiator. (substitute_keyword_value): new function. replace a keyword value - with a new one. + with a new one. 1999-09-01 Andy Piper * glyphs.c (string_set_property): new function to set the data of - a string. + a string. (image_instantiator_format_create): use it. 1999-09-07 Hrvoje Niksic @@ -33958,10 +34987,10 @@ 1999-07-30 Gleb Arshinov * ntheap.h: CONST (semantically constant) name field of file_data - struct + struct * unexnt.c (open_output_file): match function definition with - function declaration + function declaration * editfns.c: #include "sysfile.h" for getcwd() prototype @@ -34039,7 +35068,7 @@ 1999-09-02 Hrvoje Niksic * extents.c (extent_remprop): Get extent's plist address - correctly. + correctly. 1999-08-31 Andy Piper @@ -34067,22 +35096,22 @@ 1999-08-31 Andy Piper * redisplay-output.c (redisplay_normalize_glyph_area): make sure - the clip offset doesn't exceed the height we have available to - show. + the clip offset doesn't exceed the height we have available to + show. * window.h (struct window): add top_yoffset and left_xoffset for - pixel scrolling. + pixel scrolling. (WINDOW_TEXT_TOP_CLIP): new macro. * window.c (window_scroll): add behaviour for pixel-scrolling of - tall lines. + tall lines. * redisplay.h (struct display_line): add top_clip. (DISPLAY_LINE_HEIGHT): adjust for top_clip. (DISPLAY_LINE_YPOS): ditto. * redisplay.c (position_redisplay_data_type): add - start_col_xoffset to prepare for pixel-based h-scrolling. + start_col_xoffset to prepare for pixel-based h-scrolling. (WINDOW_SCROLLED): new macro. (next_tab_position): use it. (add_glyph_rune): use new hscoll vars. @@ -34093,21 +35122,21 @@ (regenerate_window_incrementally): ditto. * redisplay-x.c (x_output_display_block): use DISPLAY_LINE_YPOS, - DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. + DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. (x_output_string): ditto. (x_output_blank): ditto. (x_output_hline): ditto. (x_output_eol_cursor): ditto. * redisplay-output.c (output_display_line): allow for - top_clip. use DISPLAY_LINE_YPOS, DISPLAY_LINE_HEIGHT and - DISPLAY_LINE_YEND macros. + top_clip. use DISPLAY_LINE_YPOS, DISPLAY_LINE_HEIGHT and + DISPLAY_LINE_YEND macros. (redisplay_output_layout): output strings in layouts correctly. (redisplay_clear_clipped_region): allow for top_clip. (redisplay_calculate_display_boxes): ditto. * redisplay-msw.c (mswindows_output_blank): use DISPLAY_LINE_YPOS, - DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. + DISPLAY_LINE_HEIGHT and DISPLAY_LINE_YEND macros. (mswindows_output_cursor): ditto. (mswindows_output_string): ditto. (mswindows_redraw_exposed_window): ditto. @@ -34117,34 +35146,34 @@ (gutter_size_validate): validate gutter-size specifier. (Fgutter_size_specifier_p): predicate for gutter-size. (Fredisplay_gutter_area): allow the gutter area to be redisplayed - under user contol, like Fredisplay_echo_area. + under user contol, like Fredisplay_echo_area. (syms_of_gutter): add new functions. (specifier_type_create_gutter): add new specifier. (specifier_vars_of_gutter): change specifier types of *-height to - gutter-size. + gutter-size. * glyphs.c (glyph_width): make work with image instances. * console.h (struct console_methods): change api of output_string. * glyphs-x.c (x_map_subwindow): move before mapping as reported by - Stephen J. Turnbull + Stephen J. Turnbull 1999-08-30 Andy Piper * glyphs-x.c (x_finalize_image_instance): X_MASK -> PIXMAP_MASK - for assignment. + for assignment. (init_image_instance_from_x_image): ditto. (x_xpm_instantiate): ditto. (x_colorize_image_instance): ditto. Reported by Richard Cognot - + 1999-08-29 Andy Piper * glyphs-x.c (x_widget_instantiate): move font initialisation so - that it doesn't get saved in the user defined args. + that it doesn't get saved in the user defined args. (x_tab_control_instantiate): Set the fg color of the tab's - children. + children. (x_tab_control_set_property): ditto. 1999-08-27 Damon Lipparelli @@ -34218,28 +35247,28 @@ 1999-08-23 Andy Piper * glyphs-x.c (x_update_subwindow): make sure the widget size is - maintained after an update. + maintained after an update. * event-Xt.c (emacs_Xt_handle_magic_event): use - find_matching_subwindow to check whether the exposure is totally - inside a subwindow, if it is then ignore it. + find_matching_subwindow to check whether the exposure is totally + inside a subwindow, if it is then ignore it. * glyphs.c (find_matching_subwindow): new function. * toolbar-x.c (x_draw_blank_toolbar_button): use new - x_output_shadows signature. + x_output_shadows signature. (x_output_toolbar_button): use new x_output_x_pixmap signature. * redisplay.h (struct display_box): new structure. (struct display_glyph_area): ditto. - declare new display_box functions. + declare new display_box functions. * redisplay-x.c (x_output_pixmap): update for new display - box stuff. + box stuff. (x_bevel_area): update to allow multiple edge styles and border - segments. + segments. (x_output_display_block): update for new display_box stuff and - signatures. + signatures. (x_clear_region): ditto. (x_output_x_pixmap): ditto. adjust offsets rather than clip. (console_type_create_redisplay_x): declare new console methods. @@ -34247,38 +35276,38 @@ (x_output_shadows): update to allow selective drawing of edges. * redisplay-tty.c (tty_output_display_block): do nothing for - layouts. + layouts. * redisplay-output.c (redisplay_output_subwindow): convert to use - display_box structure, this allows us to put subwindows anywhere - with any offset, useful for layout glyphs. + display_box structure, this allows us to put subwindows anywhere + with any offset, useful for layout glyphs. (redisplay_output_layout): new function. output a layout and its - sub-glyphs. + sub-glyphs. (redisplay_output_pixmap): new modular function combining generic - parts of the X and mswindows versions. convert to use display_box - structures. + parts of the X and mswindows versions. convert to use display_box + structures. (redisplay_clear_clipped_region): new function. clear the area a - glyph is going into. + glyph is going into. (redisplay_normalize_glyph_area): new function. calculate the - bounds of a display_glyph_area given a display_box. + bounds of a display_glyph_area given a display_box. (redisplay_normalize_display_box): new function. shrink a - display_box to enclose a display_glyph_area. + display_box to enclose a display_glyph_area. (redisplay_display_boxes_in_window_p): check whether the input - display_box and display_glyph_area are actually in a window. + display_box and display_glyph_area are actually in a window. (redisplay_calculate_display_boxes): calculate display boxes based - on conventional display_line metrics. + on conventional display_line metrics. (bevel_modeline): update for new bevel_area signature. * redisplay-msw.c (mswindows_output_blank): update for new - display_box stuff. + display_box stuff. (mswindows_output_string): ditto. (mswindows_output_dibitmap): ditto. (mswindows_output_dibitmap_region): ditto. (mswindows_output_pixmap): ditto. (mswindows_bevel_area): update to allow multiple edge styles and - border segments. + border segments. (mswindows_output_display_block): update for new display_box stuff - and signatures. + and signatures. (mswindows_clear_region): ditto. (console_type_create_redisplay_mswindows): declare new console methods. @@ -34292,7 +35321,7 @@ (LAYOUT_IMAGE_INSTANCEP): new macro. (CHECK_LAYOUT_IMAGE_INSTANCE): ditto. (struct Lisp_Image_Instance): add offsets for layout and the - layout type itself. move mask here also. + layout type itself. move mask here also. (IMAGE_INSTANCE_LAYOUT_CHILDREN): new macro. (IMAGE_INSTANCE_LAYOUT_BORDER): ditto. (XIMAGE_INSTANCE_LAYOUT_CHILDREN): ditto. @@ -34316,9 +35345,9 @@ (IMAGE_INSTANCE_X_MASK): update. * glyphs-x.c (x_label_instantiate): new function. instantiate a - label. + label. (image_instantiator_format_create_glyphs_x): initialise new layout - glyph type. + glyph type. * glyphs-widget.c: new layout type. (check_valid_orientation): new keyword checker for layouts. @@ -34330,10 +35359,10 @@ (layout_instantiate): ditto. (syms_of_glyphs_widget): new keywords for layout. (image_instantiator_format_create_glyphs_widget): initialise the - layout glyph type. + layout glyph type. * glyphs-msw.h (struct mswindows_image_instance_data): remove mask - argument. + argument. (IMAGE_INSTANCE_MSWINDOWS_MASK): update. * glyphs-msw.c: declare layout format. @@ -34342,22 +35371,22 @@ * general.c: new symbols for layouts. * console.h (struct console_methods): new console methods for - outputting pixmaps and strings. + outputting pixmaps and strings. 1999-08-23 Didier Verna * sound.c: revert the renaming of `bell_volume' to `Vbell_volume' - and `bell_inhibit_time' to `Vbell_inhibit_time'. + and `bell_inhibit_time' to `Vbell_inhibit_time'. 1999-08-18 Andy Piper * redisplay-output.c (redisplay_output_subwindow): disable - clipping attempt. + clipping attempt. 1999-08-17 Andy Piper * gutter.c (redraw_exposed_gutter): handle degenerate case of no - area to expose or no gutter to display. + area to expose or no gutter to display. 1999-08-16 Charles G Waldman @@ -34373,7 +35402,7 @@ 1999-08-17 Andy Piper * gui-x.c (button_item_to_widget_value): xstrdup name so that - deleting it is ok. + deleting it is ok. 1999-08-16 Jeff Miller @@ -34382,15 +35411,15 @@ 1999-08-16 Andy Piper * redisplay-output.c (redisplay_output_subwindow): try and be more - relaxed about clipping possibilities. + relaxed about clipping possibilities. * glyphs-x.c (x_tab_control_set_property): free_widget_value_tree - rather than just the widget_value. + rather than just the widget_value. (x_update_subwindow): ditto. (x_widget_instantiate): ditto. * gutter.c (output_gutter): shrink current display lines if - required. + required. 1999-08-15 Andy Piper @@ -34399,7 +35428,7 @@ * redisplay.c (free_display_lines): make non-static. * gutter.c (free_frame_gutters): use free_display_lines instead of - Dynarr_free. + Dynarr_free. (calculate_gutter_size): ditto. 1999-08-12 Jan Vroonhof @@ -34413,8 +35442,8 @@ 1999-08-04 Mike Woolley * scrollbar-msw.c (mswindows_handle_mousewheel_event): Fixed - problem in wheelmouse code occurring when the horizontal scrollbar - is enabled but not visible. + problem in wheelmouse code occurring when the horizontal scrollbar + is enabled but not visible. 1999-08-08 Andy Piper @@ -34424,22 +35453,22 @@ * glyphs.c (Fset_image_instance_property): fiddly reorganisation. * redisplay-output.c (redisplay_output_display_block): unmap - subwindows in the block area before outputting the block. + subwindows in the block area before outputting the block. * event-msw.c (mswindows_wnd_proc): check the update rect before - painting and disable expose registration while painting. + painting and disable expose registration while painting. * glyphs.c (register_ignored_expose): check - hold_ignored_expose_registration before registering expose events. + hold_ignored_expose_registration before registering expose events. * redisplay.c (redisplay_frame): reset the subwindow cache before - displaying the gutter. + displaying the gutter. * glyphs-msw.c (mswindows_map_subwindow): move the window before - mapping. + mapping. * gutter.c (update_frame_gutters): check for glyphs_changed as if - it is the subwindow cache will have been reset. + it is the subwindow cache will have been reset. 1999-08-06 Andy Piper @@ -34449,16 +35478,16 @@ (IIFORMAT_HAS_SHARED_DEVMETHOD): new macro. * glyphs-x.c (x_combo_box_instantiate): do generic initialization - here. remove dead code. + here. remove dead code. (image_instantiator_format_create_glyphs_x): enable combo boxes - for Motif 2.0. + for Motif 2.0. * glyphs-widget.c (widget_instantiate_1): make non-static. (tree_view_instantiate): renamed from combo_box_instantiate. (image_instantiator_format_create_glyphs_widget): use new/changed methods. * glyphs-msw.c (mswindows_combo_box_instantiate): do generic - initialization here. + initialization here. * lwlib-Xm.c (xm_update_combo_box): new function. (xm_update_one_widget): call it. @@ -34466,18 +35495,18 @@ (xm_create_combo_box): create a drop-down combo box. * toolbar-msw.c (mswindows_output_toolbar): call - mswindows_move_toolbar. + mswindows_move_toolbar. 1999-08-05 Andy Piper * window.c (Fcurrent_pixel_column): new function. use display - lines to calculate pixel position of point. + lines to calculate pixel position of point. * window.c (syms_of_window): declare it. 1999-08-05 Andy Piper * glyphs.c (check_for_ignored_expose): ignore exposures wholly - contained in our ignore list. + contained in our ignore list. * buffer.c (Frecord_buffer): add call to record-buffer-hook. (syms_of_buffer): declare record-buffer-hook. @@ -34504,44 +35533,44 @@ 1999-08-04 Andy Piper * glyphs-x.c (x_finalize_image_instance): only free pixels if we - have that type of image. + have that type of image. 1999-07-30 Andy Piper * redisplay-output.c (redisplay_unmap_subwindows): add comparison - subwindow to not unmap if required. + subwindow to not unmap if required. (redisplay_unmap_subwindows_maybe): comparison is Qnil. (redisplay_unmap_subwindows_except_us): new function. (redisplay_output_subwindow): use it to unmap windows in the area - we are displaying into. + we are displaying into. * glyphs.c (update_subwindow_cachel_data): always update as we - only ever get called when an update is required. + only ever get called when an update is required. (update_subwindow_cachel): new function. sync a subwindow with its - cachel. + cachel. (Fresize_subwindow): use it. (register_ignored_expose): make sure we set the tail correctly. 1999-07-28 Andy Piper * redisplay-output.c (redisplay_clear_bottom_of_window): remove - unneeded device. + unneeded device. * gutter.c (redraw_exposed_gutter): unmap subwindows from the - whole gutter. + whole gutter. * gui.h: declare parse_gui_item_tree_list and - parse_gui_item_tree_children. + parse_gui_item_tree_children. * gui.c (parse_gui_item_tree_item): new function for parsing item - lists into gui-item trees. + lists into gui-item trees. (parse_gui_item_tree_children): ditto. (parse_gui_item_tree_list): ditto. * gui-x.h: declare gui_items_to_widget_values. * gui-x.c (gui_items_to_widget_values_1): new function for - recursively parsing gui-items into widget_values. + recursively parsing gui-items into widget_values. (gui_item_children_to_widget_values): ditto. (gui_items_to_widget_values): ditto. (sanity_check_lwlib): add widgets macrolets. @@ -34551,24 +35580,24 @@ (IMAGE_INSTANCE_WIDGET_ITEM): rename from *SINGLE_ITEM. (XIMAGE_INSTANCE_WIDGET_ITEM): ditto. (struct expose_ignore): new structure for storing ignorable expose - events. + events. * glyphs.c (valid_image_instantiator_format_p): fix so that using - a console-type as a locale works. + a console-type as a locale works. (mark_image_instance): ITEM->ITEMS. (image_instance_equal): ditto. (image_instance_hash): ditto. (struct expose_ignore_blocktype): new blocktype. (check_for_ignored_expose): new function. checks frame exposure - list for events to ignore. + list for events to ignore. (register_ignored_expose): new function. registers an expose event - as ignorable. + as ignorable. (unmap_subwindow): register the expose event as ignorable. (vars_of_glyphs): initialise the exposure blocktype. * glyphs-x.c (x_finalize_image_instance): use lw_destroy_widget. (x_update_subwindow): modify all widgets using widget_value tree - rather than just a single widget value. + rather than just a single widget value. (x_widget_instantiate): LWLIB_USES_MOTIF -> LWLIB_WIDGETS_MOTIF. make sure widgets don't resize themselves. (x_tab_control_instantiate): new function. use lwlib tab functions. @@ -34576,31 +35605,31 @@ (image_instantiator_format_create_glyphs_x): add tab_control. * glyphs-widget.c (widget_text_to_pixel_conversion): calculate - slightly more sensibly. + slightly more sensibly. (initialize_widget_image_instance): ITEM->ITEMS. (widget_instantiate_1): parse gui items generically into the ITEMS - entry. + entry. * glyphs-msw.c (mswindows_update_subwindow): replace - SINGLE_ITEM->ITEM. + SINGLE_ITEM->ITEM. (mswindows_register_widget_instance): ditto. (add_tree_item): modify to use new pre-initialised gui-item - structure. + structure. (add_tab_item): ditto. (mswindows_tab_control_instantiate): ditto. (mswindows_tab_control_set_property): ditto. (image_instantiator_format_create_glyphs_mswindows): predicate - existence of widgets on HAVE_WIDGETS. + existence of widgets on HAVE_WIDGETS. * frame.h (struct frame): add subwindow_exposures variables. * frame.c (allocate_frame_core): reset subwindow_exposures links. * event-msw.c (mswindows_wnd_proc): check for ignored - expose events before redrawing. + expose events before redrawing. * event-Xt.c (emacs_Xt_handle_magic_event): check for ignored - expose events before redrawing. + expose events before redrawing. 1999-07-30 SL Baur @@ -34730,7 +35759,7 @@ 1999-07-19 Andy Piper * glyphs-x.c (x_resize_subwindow): cope with widgets as well as - subwindows. + subwindows. * gutter.c (gutter_validate): new function for the gutter specifier. (specifier_type_create_gutter): declare specifier validator. @@ -34742,27 +35771,27 @@ * redisplay.c (add_emchar_rune): use XSTRING_DATA not string_data. * glyphs-msw.c (console_type_create_glyphs_mswindows): add - resize_subwindow. + resize_subwindow. (mswindows_resize_subwindow): new function. * gutter.c (redraw_exposed_gutter): only reset the - current_display_lines if non-zero. + current_display_lines if non-zero. (Fgutter_pixel_height): new function. (Fgutter_pixel_width): new function. * event-msw.c (mswindows_wnd_proc): set the mask of the parameter - we want to retrive from the tab control. + we want to retrive from the tab control. 1999-07-17 Andy Piper * window.c (change_window_height): mark gutters changed when we're - done. + done. * gutter.c (specifier_vars_of_gutter): make defaults more - sensible. + sensible. * gutter.h (WINDOW_REAL_GUTTER_BORDER_WIDTH): adjust to be 0 for 0 - height gutter. + height gutter. (DEFAULT_GUTTER_WIDTH): change. (DEFAULT_GUTTER_BORDER_WIDTH): change. @@ -34775,28 +35804,28 @@ * frame.c (Fmake_frame): call init_frame_gutters(). * redisplay.c (add_emchar_rune): use string functions if we are - working with a string. + working with a string. (position_redisplay_data_type): add string element. 1999-07-15 Andy Piper * winslots.h: add real_gutter_size slots to hold the actual gutter - size. This is important for autodetected sizes. + size. This is important for autodetected sizes. * gutter.c (calculate_gutter_size): calculate size for gutters - that have 'autodetect size. + that have 'autodetect size. * redisplay-msw.c (mswindows_output_vertical_divider): adjust - extent of divider for gutters. + extent of divider for gutters. * redisplay-x.c (x_output_vertical_divider): adjust extent of - divider for gutters. + divider for gutters. * scrollbar.c (update_scrollbar_instance): adjust scrollbar - position to take into account the gutters. + position to take into account the gutters. * redisplay.c (generate_modeline): adjust modeline position to - take into account the gutters. + take into account the gutters. 1999-07-14 Andy Piper @@ -34808,23 +35837,23 @@ 1999-07-13 Andy Piper * redisplay.c (calculate_display_line_boundaries): use text - boundaries so that gutters get handled properly. + boundaries so that gutters get handled properly. 1999-07-12 Andy Piper * glyphs-x.c (x_widget_instantiate): set the font Motif-style if - we're using Motif. + we're using Motif. * redisplay-output.c (redisplay_clear_to_window_end): generalised - from redisplay-x.c + from redisplay-x.c * redisplay-x.c (redisplay_clear_to_window_end): moved to - redisplay.c + redisplay.c * redisplay-msw.c (redisplay_clear_to_window_end): deleted. * gutter.c: new file - implements gutters. All new functions are - semantically equivalent to the toolbar functions. + semantically equivalent to the toolbar functions. (gutter_was_visible): new function. (get_gutter_coords): ditto. (output_gutter): ditto. @@ -34853,7 +35882,7 @@ (specifier_vars_of_gutter): ditto. * gutter.h: new file. Contains gutter constants and sizing macros - similar to those for the toolbar. + similar to those for the toolbar. * winslots.h: add gutter variables. @@ -34875,20 +35904,20 @@ * search.c (bi_find_next_emchar_in_string): new function. * scrollbar.c (update_scrollbar_instance): remove reference to - window_bottom_toolbar_height which did nothing. + window_bottom_toolbar_height which did nothing. * redisplay.h (struct display_line): add face indices for - overriding defaults in output_display_line. + overriding defaults in output_display_line. Add gutter_changed flags and declarations. * redisplay.c (create_string_text_block): new function, similar to - create_text_block but for strings. Display tables etc are used - from the currently selected window. + create_text_block but for strings. Display tables etc are used + from the currently selected window. (generate_string_display_line): ditto. Similar to - generate_display_line. + generate_display_line. (generate_displayable_area): generate display lines for a given - area on a frame. Input is the string, with associated extents, to - display. + area on a frame. Input is the string, with associated extents, to + display. (redisplay_frame): add gutter_changed check. (redisplay_device): ditto. (redisplay_without_hooks): ditto. @@ -34901,39 +35930,39 @@ (x_output_vertical_divider): use bevel_area. * redisplay-output.c (output_display_line): check display_lines - for face information before using defaults. + for face information before using defaults. (bevel_modeline): new function, calls bevel_area with appropriate - values. + values. * redisplay-msw.c (bevel_modeline): moved to redisplay.c. (mswindows_redraw_exposed_area): redraw exposed gutters. (mswindows_bevel_area): new redisplay device method. (console_type_create_redisplay_mswindows): add bevel_area device - method. + method. * indent.c (string_column_at_point): add column_at_point but for - strings. + strings. * glyphs-x.c (image_instantiator_format_create_glyphs_x): only - instantiate widgets that we have a toolkit for. + instantiate widgets that we have a toolkit for. * general.c: add Qgutter. * frame.h (struct frame): add display lines for gutters and - visibility flags. + visibility flags. * frame.c (set_frame_selected_window): mark gutters changed. * emacs.c (main_1): add gutter initialisation. * device.h (struct device): add gutter_changed flag and macros to - manipulate it. + manipulate it. * console.h (struct console_methods): new bevel area redisplay - method. + method. * buffer.h (REAL_INC_CHARBYTIND): new macro for strings as - REAL_INC_BYTIND is for buffers. + REAL_INC_BYTIND is for buffers. (INC_CHARPTR): ditto. * Makefile.in.in (objs): add gutter.o @@ -34980,32 +36009,32 @@ * console.h: ditto. * console-tty.c (image_instantiator_format_create_glyphs_tty): new - function. validate appropriate image formats for tty. + function. validate appropriate image formats for tty. * glyphs.h (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM): - initialize consoles parameter. + initialize consoles parameter. (struct image_instantiator_methods): add consoles parameter. (IIFORMAT_VALID_CONSOLE): new function. validate the format on the - console. + console. (INITIALIZE_DEVICE_IIFORMAT): validate the format on the given - console. + console. * glyphs-msw.c: declare instantiators for later use. (image_instantiator_format_create_glyphs_mswindows): validate xpm - and friends on the mswindows console. + and friends on the mswindows console. * glyphs-x.c: ditto. * glyphs.c (valid_image_instantiator_format_p): disallow glyphs - that have not been registered on the supplied device. + that have not been registered on the supplied device. (Fvalid_image_instantiator_format_p): add locale argument. (instantiate_image_instantiator): valid image instantiator on the - device. + device. * symsinit.h: add image_instantiator_format_create_glyphs_tty() - declaration. + declaration. * emacs.c (main_1): add call to - image_instantiator_format_create_glyphs_tty(). + image_instantiator_format_create_glyphs_tty(). 1999-06-29 Olivier Galibert @@ -35038,10 +36067,10 @@ 1999-06-28 Andy Piper * glyphs-x.c: change tree -> tree-view, progress -> - progress_gauge, edit -> edit-field, tab -> tab-control, combo -> - combo-box. + progress_gauge, edit -> edit-field, tab -> tab-control, combo -> + combo-box. (complex_vars_of_glyphs_x): provide-on-console the implemented - widget types. + widget types. * glyphs-msw.c: ditto. (complex_vars_of_glyphs_mswindows): ditto. @@ -35050,11 +36079,11 @@ * fns.c (Ffeaturep): add extra optional console argument. (Fprovide_on_console): like Fprovide but provides only on the - specified console-type. + specified console-type. (Frequire): check console-features as well as global features. * console.c (Fconsole_features): new function. return features for - this console. + this console. (syms_of_console): add Fconsole_features. * console.h (CONMETH_FEATURES): new function for accessing features. @@ -35065,32 +36094,32 @@ 1999-06-28 Andy Piper * event-Xt.c (handle_focus_event_1): conditionally compile for - X11R5. + X11R5. * s/cygwin32.h: fix me website address. * event-msw.c: add NMHDR for pre b20 cygwin builds. * gui-x.c (button_item_to_widget_value): only add callback if it - is non-nil. + is non-nil. * glyphs-x.c: add progress, edit and combo instantiators. (x_widget_set_property): new function. uses lwlib to set widget - values. + values. (x_widget_property): new function. uses lwlib to get widget - values. + values. (x_button_instantiate): support images in buttons. (x_button_property): new function. use lwlib to get the selected - state. + state. (x_progress_instantiate): new function for instantiating progress - gauges. + gauges. (x_progress_set_property): new function. sets the progress gauge - position. + position. (x_edit_instantiate): new function. for instantiating edit fields. (x_combo_instantiate): new function. for instantiating combo - boxes. + boxes. (image_instantiator_format_create_glyphs_x): add new device ii - formats. + formats. * glyphs-msw.c (mswindows_tab_instantiate): remove redundant var. @@ -35101,7 +36130,7 @@ 1999-06-25 Andy Piper * menubar-x.c (menu_item_descriptor_to_widget_value_1): use new - gui functions. + gui functions. * menubar-msw.c: move MAX_MENUITEM_LENGTH to gui.h @@ -35116,39 +36145,39 @@ (gui_name_accelerator): new function stolen from gui-x.c * gui-x.c (popup_selection_callback): always define. mark - subwindows changed after calling a callback. + subwindows changed after calling a callback. (menu_name_to_accelerator): deleted. (button_item_to_widget_value): forward gui_item things to gui_item - functions. + functions. * glyphs-x.h (struct x_subwindow_data): add data for widgets. add - appropriate accesors. + appropriate accesors. * glyphs-x.c: declare new glyph formats. (x_finalize_image_instance): unmanage and destroy widgets if they - exist. + exist. (x_unmap_subwindow): handle widgets specially. (x_map_subwindow): ditto. offset display of widgets by offset of - text widget within container. + text widget within container. (x_update_subwindow): new function. call lw_modify_all_widgets - when we are a widget. + when we are a widget. (x_widget_instantiate): new function for generically creating - widgets-glyphs. toolkit specifics forwarded to lwlib. + widgets-glyphs. toolkit specifics forwarded to lwlib. (x_button_instantiate): new function for instantiating - widgets-glyph buttons. + widgets-glyph buttons. (console_type_create_glyphs_x): register update_subwindow. (image_instantiator_format_create_glyphs_x): register widget and - button types. + button types. * event-msw.c (mswindows_wnd_proc): remove redundant variable. * event-Xt.c (x_event_to_emacs_event): call handle_focus_event_1 - when we get a button press in case we do not have the focus. + when we get a button press in case we do not have the focus. (handle_focus_event_1): set the keyboard focus to the text widget - if we do not have it. + if we do not have it. * dialog-x.c (dbox_descriptor_to_widget_value): use new gui_item - functions. + functions. 1999-06-24 SL Baur @@ -35176,7 +36205,7 @@ * lrecord.h: Added basic external description system. * symbols.c: Added symbol, symbol-value-buffer-local, - symbol-value-lisp-magic and symbol-value-varalias description. + symbol-value-lisp-magic and symbol-value-varalias description. * mule-charset.c: Added charset description. * marker.c: Added marker description. * keymap.c: Added keymap description. @@ -35215,8 +36244,8 @@ 1999-06-18 Olivier Galibert * lrecord.h: Added description as a placehold in the lrecord - implementation structures. Added the parameter to all constructor - defines. + implementation structures. Added the parameter to all constructor + defines. * alloc.c: Added placeholders. * buffer.c: Ditto. @@ -35327,58 +36356,58 @@ * event-msw.c (mswindows_need_event): assert badly_p status. (mswindows_wnd_proc): modify WM_NOTIFY handling to cope with - callbacks in tree-view and tab-control widgets. + callbacks in tree-view and tab-control widgets. (emacs_mswindows_next_event): modify use of - mswindows_dequeue_dispatch_event. + mswindows_dequeue_dispatch_event. * dialog-msw.c (mswindows_popup_dialog_box): modify for new - lisp-based gui_items. + lisp-based gui_items. * glyphs-msw.c (mswindows_update_subwindow): update use of - gui_items. + gui_items. (mswindows_register_gui_item): new function. (mswindows_register_gui_item): fix to use lisp gui_items. (mswindows_widget_instantiate): ditto. (mswindows_button_instantiate): ditto. (add_tree_item): new function to recursively add tree view - elements. + elements. (add_tree_item_list): ditto. (mswindows_tree_instantiate): new function. instantiate tree view - controls. + controls. (add_tab_item): new function to add tabs to a tab control. (mswindows_tab_instantiate): new function. instantiate tab - controls. + controls. (image_instantiator_format_create_glyphs_mswindows): add tree view - and tab controls. + and tab controls. (vars_of_glyphs_mswindows): ditto. * glyphs-widget.c (check_valid_item_list_1): allow nested lists in - item lists. + item lists. (check_valid_item_list): ditto. (initialize_widget_image_instance): fix to use new lisp gui_item. (widget_instantiate_1): allow the setting of default textwidth in - characters. + characters. (widget_instantiate): change to use new widget_instantiate_1 - signature. + signature. (combo_instantiate): ditto. (static_instantiate): ditto. (tab_instantiate): new function for tab widgets. (image_instantiator_format_create_glyphs_widget): add tab and tree - view widgets. + view widgets. * menubar-msw.c (displayable_menu_item): convert to use lisp - gui_items. + gui_items. (populate_menu_add_item): ditto. (populate_or_checksum_helper): ditto. * menubar.c (menu_parse_submenu_keywords): convert to use lisp - gui_items. + gui_items. (Fmenu_find_real_submenu): ditto. * gui.h (struct Lisp_Gui_Item): make gui_item a lisp oebjct. * gui.c (gui_item_add_keyval_pair): gui_items are now lisp - objects, convert functions that use them accordingly. + objects, convert functions that use them accordingly. (gui_item_init): ditto. (gui_item_active_p): ditto. (gui_item_selected_p): ditto. @@ -35388,7 +36417,7 @@ (mark_gui_item): ditto. (allocate_gui_item): new function to create a gui_item. (make_gui_item_from_keywords_internal): ditto. create and return a - gui_item as well as setting keywords. + gui_item as well as setting keywords. (gui_parse_item_keywords): ditto. (gui_parse_item_keywords_no_errors): ditto. (gui_add_item_keywords_to_plist): new function, not yet used. @@ -35404,9 +36433,9 @@ 1999-06-10 Andy Piper * select-msw.c (mswindows_own_selection): only set the clipboard - if asked. + if asked. (mswindows_get_foreign_selection): only get the clipboard if - asked. + asked. (mswindows_disown_selection): only disown the clipboard if asked. 1999-06-03 MORIOKA Tomohiko @@ -35433,7 +36462,7 @@ 1999-06-06 Hrvoje Niksic * fns.c (MIME_LINE_LENGTH): Default to 72, as in mimencode and - base64.el. + base64.el. (base64_decode_1): Signal errors instead of returning -1. 1999-06-07 Hrvoje Niksic @@ -35447,7 +36476,7 @@ 1999-06-05 Hrvoje Niksic * fns.c (base64_decode_1): Allow and ignore any non-base64 - characters in input. + characters in input. 1999-05-27 Olivier Galibert @@ -35504,7 +36533,7 @@ 1999-05-27 Hrvoje Niksic * fns.c (Fsubstring): Don't traverse the same region twice with - charcount_to_bytecount(). + charcount_to_bytecount(). 1999-06-03 SL Baur @@ -35559,7 +36588,7 @@ 1999-05-27 Hrvoje Niksic * mule-charset.c (Fmake_char): Strip the eighth bit off ARG1 and - ARG2. + ARG2. 1999-05-21 Andy Piper @@ -35568,43 +36597,43 @@ * symsinit.h: declare select initialisation. * select.h: new file. declare commonly used select functions and - variables. + variables. * select.c: new file. generalised from xselect.c. (clean_local_selection_data): moved from xselect.c. (get_local_selection): ditto. device specific pieces called via a - devmeth. + devmeth. (handle_selection_clear): ditto. (Fown_selection_internal): renamed and generalised from - Fx_own_selection_internal. moved from xselect.c. + Fx_own_selection_internal. moved from xselect.c. (Fdisown_selection_internal): ditto. (Fselection_owner_p): ditto. (Fselection_exists_p): ditto. (Fget_selection_internal): ditto. (syms_of_select): new function. QXXXX values moved from xselect.c (vars_of_select): new function. selection_converter_alist, - lost_selection_hooks moved and renamed from xselect.c + lost_selection_hooks moved and renamed from xselect.c * select-x.c: renamed from xselect.c. - (x_own_selection): converted to device specific. non-X-specific - bits moved to select.c. + (x_own_selection): converted to device specific. non-X-specific + bits moved to select.c. (x_get_foreign_selection): ditto. (x_disown_selection): ditto. (x_selection_exists_p): ditto. (console_type_create_select_x): new function. * select-msw.c (mswindows_own_selection): new device method to set - the clipboard when we 'own' the selection. + the clipboard when we 'own' the selection. (mswindows_get_foreign_selection): new device method to get the - clipboard. + clipboard. (mswindows_disown_selection): new device method to delete the - selection when we 'disown' it. + selection when we 'disown' it. (console_type_create_select_mswindows): new function. * emacs.c (main_1): add select to things to initialise. * console.h (struct console_methods): new console methods for - selection. + selection. * Makefile.in.in (x_objs): xselect.c renamed to select-x.c @@ -35615,7 +36644,7 @@ 1999-05-16 Andy Piper * ntproc.c (syms_of_ntproc): default - win32-start-process-share-console to t. + win32-start-process-share-console to t. 1999-05-14 Hrvoje Niksic @@ -35626,7 +36655,7 @@ 1999-05-14 Andy Piper * toolbar-msw.c (mswindows_output_toolbar): hash on something - hashable. + hashable. 1999-05-14 XEmacs Build Bot @@ -35669,7 +36698,7 @@ 1999-05-11 Andy Piper * ntproc.c (sys_spawnve): actually assign argv[0] instead of the - first character. + first character. 1999-05-10 Hrvoje Niksic @@ -35731,9 +36760,9 @@ * ntproc.c: remove many warnings. (_sys_read_ahead): moved from nt.c and made static. (rva_to_section): moved from unexnt.c but not defined under - mingw32. + mingw32. (win32_executable_type): implement what we can for mingw32 - headers. + headers. (sys_spawnve): fix bad MULE/GCPRO bug in filename handling. * ntheap.h: remove declarations of functions that are now static. @@ -35758,7 +36787,7 @@ * systty.h: ditto. * config.h.in: don't turn on DEBUG_ENCAPSULATION by default because - some systems don't have all of the encapsulated system calls. + some systems don't have all of the encapsulated system calls. * callproc.c: warning elimination. * dired-msw.c: ditto. @@ -35812,7 +36841,7 @@ * lisp.h (struct Lisp_Symbol): Removed .obarray field. * symbols.c (init_symbols_once_early): Removed - Vpure_uninterned_symbol_table. + Vpure_uninterned_symbol_table. (Fintern): Don't store to ->obarray field. 1999-04-22 Hrvoje Niksic @@ -35823,7 +36852,7 @@ 1999-04-11 Oscar Figueiredo * eldap.c (Fldap_search_internal): Add a new parameter `withdn' to - retrieve the distinguished names of entries + retrieve the distinguished names of entries 1999-03-08 Martin Buchholz @@ -35840,7 +36869,7 @@ * gdbinit: Ditto. * lrecord.h: Make gung-ho mandatory. Remove pure flag and add - c_readonly and lisp_readonly. Remove implementation arrays. + c_readonly and lisp_readonly. Remove implementation arrays. (C_READONLY_RECORD_HEADER_P): Added. (LISP_READONLY_RECORD_HEADER_P): Added. (SET_C_READONLY_RECORD_HEADER): Added. @@ -35856,18 +36885,18 @@ * lisp-disunion.h: Ditto. * alloc.c: Kill everything purespace/non gung-ho related. Fix all - set_lheader_implementation calls. + set_lheader_implementation calls. (c_readonly): Added. (lisp_readonly): Added. (make_string_nocopy): Added. (Fpurecopy): Changed to do nothing. Kept the old documentation - for reference purposes for the next patches. + for reference purposes for the next patches. (sweep_lcrecords_1): Don't free C readonly lcrecords. (sweep_bit_vectors_1): Don't free C readonly bitvectors. (SWEEP_FIXED_TYPE_BLOCK): Don't free C readonly lrecords. * fns.c: Make gung-ho mandatory. - (Fput): CHECK_IMPURE -> CHECK_LISP_WRITEABLE. + (Fput): CHECK_IMPURE -> CHECK_LISP_WRITEABLE. (Fremprop): Ditto. (Ffillarray): Ditto. @@ -35880,8 +36909,8 @@ (Faset): Ditto. * symbols.c: Make gung-ho mandatory. make_pure_pname -> - make_string or make_string_nocopy. Fix various - alloc_lcrecord_type. + make_string or make_string_nocopy. Fix various + alloc_lcrecord_type. * lread.c: Remove everything purespace related. (Flocate_file_clear_hashing): purified -> c_readonly. @@ -35889,7 +36918,7 @@ (read_atom): make_pure_pname -> make_string. * emacs.c (Frun_emacs_from_temacs): Remove purespace stats - reporting. + reporting. (Fdump_emacs): Ditto. * print.c (print_internal): Make gung-ho mandatory. @@ -35898,10 +36927,10 @@ * symeval.h (symbol_value_forward_lheader_initializer): Ditto. * sheap.c (more_static_core): Remove puresize-adjust.h from - message. + message. * syntax.c (complex_vars_of_syntax): make_pure_string -> - make_string_nocopy. + make_string_nocopy. * keymap.c (make_keymap): Fix alloc_lcrecord_type. (vars_of_keymap): make_pure_string -> make_string_nocopy. * events.c (deinitialize_event): Fix set_lheader_implementation. @@ -35944,7 +36973,7 @@ (Fcurrent_window_configuration): Fix alloc_lcrecord. (vars_of_window): Fix make_lcrecord_list. * faces.c (allocate_face): Fix alloc_lcrecord_type. pure_list -> - Flist. + Flist. * lstream.c (Lstream_new): Fix make_lcrecord_list. * opaque.c (make_opaque): Fix alloc_lrecord. (make_opaque_list): Fix alloc_lrecord_type. @@ -35954,25 +36983,25 @@ * process.c (Fstart_process_internal): Ditto. * ntproc.c (sys_spawnve): Use Vlisp_EXEC_SUFFIXES when calling - locate_file(). + locate_file(). * glyphs-x.c (x_locate_pixmap_file): Ditto. * glyphs-msw.c (mswindows_locate_pixmap_file): Fix call to - locate_file(). + locate_file(). * emodules.c (vars_of_module): New variable Vmodule_extensions. (emodules_load): Use it when calling locate_file(). * emacs.c (main_1): Use Vlisp_EXEC_SUFFIXES when calling - locate_file(). + locate_file(). * callproc.c: Vlisp_EXEC_SUFFIXES: New variable. (vars_of_callproc): Initialize it. (Fcall_process_internal): Use it when calling locate_file(). * alloc.c (disksave_object_finalization): Use - Flocate_file_clear_hashing(). + Flocate_file_clear_hashing(). * lread.c (Flocate_file_clear_hashing): Clear all hasing when given `t' as argument. @@ -35993,14 +37022,14 @@ (locate_file_map_suffixes): New function. (locate_file_in_directory_mapper): New function. (locate_file_in_directory): Use locate_file_in_directory_mapper() - and locate_file_map_suffixes(). + and locate_file_map_suffixes(). (locate_file_construct_suffixed_files): Use - locate_file_map_suffixes(). + locate_file_map_suffixes(). (locate_file_without_hash): Don't GCPRO path. (Flocate_file_clear_hashing): Use EXTERNAL_LIST_LOOP. (syms_of_lread): Remove Qlocate_file_hash_table. (locate_file_find_directory_hash_table): Use - Vlocate_file_hash_table. + Vlocate_file_hash_table. (locate_file_refresh_hashing): Ditto. * lread.c: Renamed read_objects to Vread_objects. @@ -36008,9 +37037,9 @@ 1999-04-16 Olivier Galibert * mule-charset.c: Generally resync with fsf 20.3 charset - interface. + interface. (make_charset): Add long and short name. Use id instead of - leading byte. + leading byte. (Fmake_charset): Ditto. (Fmake_reverse_direction_charset): Ditto. (Fcharset_property): Ditto. @@ -36021,7 +37050,7 @@ (complex_vars_of_mule_charset): Synced charsets. * mule-charset.h: Removed leading byte (uses id instead), added - short and long name. + short and long name. 1999-04-15 Hrvoje Niksic @@ -36030,7 +37059,7 @@ 1999-04-08 Olivier Galibert * mule-charset.c (complex_vars_of_mule_charset): Allow all iso8859 - and -ascii fonts for displaying ascii instead of iso8859-1 only. + and -ascii fonts for displaying ascii instead of iso8859-1 only. 1998-12-14 Hrvoje Niksic @@ -36043,9 +37072,9 @@ (user_name_completion): Use xmalloc/xrealloc/xfree. (user_name_completion): Use DO_REALLOC. (user_name_completion): Cut down the number of static variables; - use a structure. + use a structure. (user_name_completion): Username completion is always - case-sensitive. + case-sensitive. 1998-12-06 Hrvoje Niksic @@ -36064,7 +37093,7 @@ (Fbase64_encode_region): If buffer is read-only, bail out early. (Fbase64_decode_region): Ditto. (Fbase64_encode_region): Initialize SPECCOUNT to pacify the - compiler. + compiler. (Fbase64_encode_string): Ditto. (Fbase64_decode_region): Ditto. (Fbase64_decode_string): Ditto. @@ -36080,13 +37109,13 @@ 1999-03-05 Philip Aston * device-msw.c: Fix DEFVAR format - Death to phantom quote, and - add magic newline. + add magic newline. 1999-03-05 Philip Aston * toolbar-msw.c Consider captions when deciding whether to rebuild - toolbar. This fixes the initial toolbar display for those of us - who don't like captions. These patches applied by Andy Piper. + toolbar. This fixes the initial toolbar display for those of us + who don't like captions. These patches applied by Andy Piper. 1999-03-12 XEmacs Build Bot @@ -36390,7 +37419,7 @@ 1999-03-02 Andy Piper * event-stream.c (init_event_stream): make sure native mswindows - gets an appropriate event loop. + gets an appropriate event loop. 1999-02-22 Andy Piper @@ -36442,7 +37471,7 @@ 1999-02-02 Gleb Arshinov * process-nt.c (nt_send_process): - Fix for process-send-region/process-send-string breaking when size + Fix for process-send-region/process-send-string breaking when size of the input > 128 chars: change maximum chunk size for process stream from 512 to 128, thus guaranteeing that ntpipe_shove_writer succeeds. @@ -36468,15 +37497,15 @@ * glyphs-msw.c: add xface support. (mswindows_xface_instantiate): new function copied from glyphs-x.c (image_instantiator_format_create_glyphs_mswindows): do device - specific initialisation for xfaces. + specific initialisation for xfaces. (xbm_create_bitmap_from_data): line data must be padded to a word - boundary. + boundary. * glyphs-x.c (xface_validate): moved to glyphs.c (xface_normalize): ditto. (xface_possible_dest_types): ditto. (image_instantiator_format_create_glyphs_x): do device specific - initialisation for xfaces. + initialisation for xfaces. * glyphs.h: declare xface symbol. @@ -36485,7 +37514,7 @@ (xface_normalize): ditto. (xface_possible_dest_types): ditto. (image_instantiator_format_create): xface declarations moved from - glyphs-x.c. + glyphs-x.c. 1999-01-14 Adrian Aichner @@ -36510,12 +37539,12 @@ 1999-01-12 Andy Piper * redisplay-output.c (redisplay_update_line): backout change that - shouldn't have gone ine. + shouldn't have gone ine. 1999-01-09 Oscar Figueiredo * eldap.c (vars_of_ldap): Do no provide `ldap' here since it may - collide with ldap.el + collide with ldap.el 1999-01-11 Andy Piper @@ -36527,15 +37556,15 @@ (mswindows_output_display_block): ditto. * redisplay-output.c (redisplay_output_display_block): new - function. just call the devmeth, maybe insert some generic code - here later. + function. just call the devmeth, maybe insert some generic code + here later. (compare_display_blocks): use it. (output_display_line): ditto. (redisplay_unmap_subwindows_maybe): new function. potentially - unmap subwindows in the given area. + unmap subwindows in the given area. * glyphs.c (reset_subwindow_cachels): unmap subwindows that we are - resetting. + resetting. 1999-01-10 J. Kean Johnston @@ -36622,26 +37651,26 @@ 1998-12-18 Jim Radford * device-x.c (Fx_set_font_path, Fx_get_font_path): New functions - so that packages that distribute their own fonts can access them. + so that packages that distribute their own fonts can access them. 1998-12-28 Andy Piper * glyphs-msw.c (mswindows_button_instantiate): cope with buttons - that have an image provided. + that have an image provided. * glyphs.h: add Q_image decl. * glyphs-widget.c new functionality allowing images in - widgets. - (check_valid_glyph_or_image): new function to validate - glyphs passed in through :image. + widgets. + (check_valid_glyph_or_image): new function to validate + glyphs passed in through :image. (widget_normalize): new function. convert :image parameters into - real glyphs if not already so. + real glyphs if not already so. (widget_instantiate_1): mess with size parameters to be similar to - :image if provided. + :image if provided. (syms_of_glyphs_widget): new keyword :image. (image_instantiator_format_create_glyphs_widget): normalize - buttons and allow :image. + buttons and allow :image. 1998-12-27 Andy Piper @@ -36652,22 +37681,22 @@ (check_valid_symbol): as it sounds. (check_valid_string_or_vector): ditto. (widget_validate): modified for descriptors that are vectors or - sequences of keyword/val pairs. + sequences of keyword/val pairs. (widget_instantiate_1): ditto. (image_instantiator_format_create_glyphs_widget): allow gui_item - keywords in the instantiator. + keywords in the instantiator. * gui.c (gui_parse_item_keywords_internal): renamed from - gui_parse_item_keywords but taking error behaviour. + gui_parse_item_keywords but taking error behaviour. (gui_parse_item_keywords): use it. (gui_parse_item_keywords_no_errors): ditto. (gui_item_add_keyval_pair): add Error_behavior flag and only - signal invalid keywords if required. + signal invalid keywords if required. * gui.h: new gui signatures. * menubar.c (menu_parse_submenu_keywords): use new - gui_item_add_keyval_pair signature. + gui_item_add_keyval_pair signature. * s/cygwin32.h: modify PTY_ITERATION to eliminate warnings. @@ -36780,7 +37809,7 @@ 1998-12-22 Andy Piper * redisplay-output.c (redisplay_clear_region): make sure that - fg/bg colors get set even when we are in the border area. + fg/bg colors get set even when we are in the border area. 1998-12-13 Martin Buchholz @@ -36986,22 +38015,22 @@ (widget_set_property): ditto. * frame-msw.c (mswindows_set_frame_pointer): SetCursor() as well - as setting the class cursor so that GC actually changes the - cursor. + as setting the class cursor so that GC actually changes the + cursor. * config.h: don't undef MAIL_USE_POP. 1998-12-13 Andy Piper * glyphs-msw.c - (image_instantiator_format_create_glyphs_mswindows): line -> - label. + (image_instantiator_format_create_glyphs_mswindows): line -> + label. (mswindows_label_instantiate): ditto. Play with window flags. (image_instantiator_format_create_glyphs_mswindows): ditto. (vars_of_glyphs_mswindows): provide Qlabel as we support it now. * glyphs-widget.c (widget_instantiate_1): re-jig autosizing to - cope with lines and labels. + cope with lines and labels. (static_instantiate): use widget_instantiate_1. line -> label. (image_instantiator_format_create_glyphs_widget): ditto. @@ -37013,21 +38042,21 @@ 1998-12-10 Andy Piper * gui.c: adjust defines of HAVE_POPUPS so that we can build with - no window system. + no window system. 1998-12-09 Andy Piper * glyphs.c (finalize_image_instance): mark glyphs changed when an - image instance is removed so that the subwindow cache gets reset - and thus destroyed images get GC'd. + image instance is removed so that the subwindow cache gets reset + and thus destroyed images get GC'd. 1998-12-08 Andy Piper * gui-msw.c (mswindows_handle_gui_wm_command): call - MARK_SUBWINDOWS_CHANGED. + MARK_SUBWINDOWS_CHANGED. * glyphs-msw.c (mswindows_finalize_image_instance): make sure - subwindows really get deleted. + subwindows really get deleted. * redisplay.c: new variable subwindows_changed[_set]. (redisplay_window): use it. @@ -37036,7 +38065,7 @@ (redisplay_without_hooks): ditto. * device.h (MARK_DEVICE_SUBWINDOWS_CHANGED): new macro for - subwindows redisplay as per glyphs equivalent. + subwindows redisplay as per glyphs equivalent. * redisplay.h: ditto. (MARK_SUBWINDOWS_CHANGED): ditto. (RESET_CHANGED_SET_FLAGS): ditto. @@ -37045,55 +38074,55 @@ 1998-12-07 Andy Piper * frame.c (Fmake_frame): reset subwindow cachels on non-stream - frames. + frames. * redisplay.c (redisplay_frame): invalidate subwindow cachels. * event-msw.c (mswindows_wnd_proc): catch the various WM_CTLCOLOR* - messages and paint widget glyphs as appropriate with their face fg - & bg. + messages and paint widget glyphs as appropriate with their face fg + & bg. 1998-12-06 Andy Piper * glyphs-msw.c (vars_of_glyphs_mswindows): provide widget types - here rather than in glyphs-widget - do this because we only want - to provide what is really available. + here rather than in glyphs-widget - do this because we only want + to provide what is really available. * glyphs.c (Fimage_instance_property): new function to get the - properties of image instances. wires through to console specific - methods and then to widget specific methods. + properties of image instances. wires through to console specific + methods and then to widget specific methods. (Fset_image_instance_property): ditto but for setting widget properties. (check_valid_face): make extern so that it can be used elsewhere. * glyphs-widget.c (widget_property): new function. gets the - properties of widgets in general and wires the function through to - widget specific ones. + properties of widgets in general and wires the function through to + widget specific ones. (widget_set_property): ditto but for setting widget properties. * glyphs-msw.c (mswindows_combo_instantiate): Add functionality to - add items to the list. Play with window styles a bit to get the - desired effect. + add items to the list. Play with window styles a bit to get the + desired effect. (mswindows_widget_property): break out specific widget properties. (mswindows_button_property): new function. gets the checked state - of a button. + of a button. (mswindows_combo_property): new function. gets the current - selection in the combo box. + selection in the combo box. (mswindows_widget_set_property): new function. sets specific - properties of specific widgets. + properties of specific widgets. * glyphs-widget.c (check_valid_item_list): new function. check - that items for a combo-box are just a list of strings. + that items for a combo-box are just a list of strings. (combo_validate): new function. check there is an item list. (widget_instantiate_1): new function. renamed from - widget_instantiate so that we can do slightly different things for - other widgets. + widget_instantiate so that we can do slightly different things for + other widgets. (widget_instantiate): call widget_instantiate_1. (combo_instantiate): new function to instantiate combo boxes, - defaults height to the pixel height of the number of items in the - box. + defaults height to the pixel height of the number of items in the + box. (syms_of_glyphs_widget): move widget keywords here. (image_instantiator_format_create_glyphs_widget): use new combo - functions. + functions. 1998-12-04 Andy Piper @@ -37108,117 +38137,117 @@ (mswindows_widget_set_property): ditto. * redisplay-output.c (redisplay_output_subwindow): don't show - subwindows if they are obscured at the edge of the frame, emacs - gets into some sort of redisplay loop otherwise. + subwindows if they are obscured at the edge of the frame, emacs + gets into some sort of redisplay loop otherwise. * gui.h: prototype gui_item_selected_p. * gui.c (gui_item_selected_p): new function to determine the - selected state of a gui_item. + selected state of a gui_item. * frame.h (struct frame): add subwindows_changed flag. * redisplay.c (redisplay_frame): call update_frame_subwindows (). * glyphs.c (update_subwindow): new function to update a - subwindow's state. + subwindow's state. (update_frame_subwindows): new function to update all the - subwindows on a frame. + subwindows on a frame. * console.h (struct console_methods): add update_subwindow. * glyphs-msw.c (mswindows_widget_property): return selected state - for selected property. + for selected property. (mswindows_update_subwindow): new function. updates widget glyphs - in redisplay as per menubars or toolbars e.g. selected state. + in redisplay as per menubars or toolbars e.g. selected state. (console_type_create_glyphs_mswindows): add update_subwindow. 1998-12-03 Andy Piper * console-tty.c (syms_of_console_tty): MULE -> FILE_CODING since - tty coding system things are such. + tty coding system things are such. * glyphs-widget.c (widget_face_font_info): new function for - pulling out height and width metrics for a widget's face. + pulling out height and width metrics for a widget's face. (widget_text_to_pixel_conversion): calculate pixel sizes of text - for widgets. + for widgets. * event-msw.c (mswindows_drain_windows_queue): translate messages - that are destined for subwindows. This makes edit fields interact - with the keyboard correctly. + that are destined for subwindows. This makes edit fields interact + with the keyboard correctly. nuke warnings by #ifndef'ing out stuff not required by msg select(). * glyphs.h (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT_NO_SYM): new - macro defining the iiforma without the symbol required by widget. + macro defining the iiforma without the symbol required by widget. (INITIALIZE_IMAGE_INSTANTIATOR_FORMAT): use it. * general.c (syms_of_general): add Qwidget, Qselected. * faces.c (complex_vars_of_faces): add widget face inheriting from - gui-element face. + gui-element face. 1998-11-09 Andy Piper * window.h (struct window): add a cache of subwindows on a - per-window basis. + per-window basis. * window.c (mark_window): mark the subwindow_instance_cache. (allocate_window): initialise the subwindow instance_cache. * toolbar-x.c (x_output_toolbar): call redisplay_clear_region - instead of the devmeth. + instead of the devmeth. (x_clear_toolbar): ditto. * redisplay-x.c (x_output_display_block): call - redisplay_output_subwindow for subwindows and widgets. + redisplay_output_subwindow for subwindows and widgets. * redisplay-tty.c (tty_output_display_block): add IMAGE_WIDGET to - types to do nothing for. + types to do nothing for. * lisp.h: declare new widget/subwindow symbols. * glyphs.c (image_instantiate): cache subwindows on a per-window - basis. + basis. (subwindow_possible_dest_types): new function for subwindow dest - types. + types. (subwindow_instantiate): generic instantiation of a - subwindow. specialised by device multi-methods. + subwindow. specialised by device multi-methods. (Fsubwindowp): moved from glyphs-x.c. adapted for glyph-based - subwindows. + subwindows. (Fimage_instance_subwindow_id): ditto. (Fresize_subwindow): ditto. (Fforce_subwindow_map): ditto. * glyphs-x.c (x_print_image_instance): remove subwindow - stuff. Handled genrically in glyphs.c. + stuff. Handled genrically in glyphs.c. (x_image_instance_equal): ditto. (x_image_instance_hash): ditto. (x_finalize_image_instance): delete subwindows when required. (mark_subwindow) (print_subwindow) (finalize_subwindow) - (subwindow_hash) (Fmake_subwindow): deleted because of new, - glyph-based, subwindow implementation. + (subwindow_hash) (Fmake_subwindow): deleted because of new, + glyph-based, subwindow implementation. (Fsubwindow_height) (Fsubwindow_width) (Fsubwindow_xid): aliased - in glyphs.el + in glyphs.el (Fsubwindowp) (Fresize_subwindow) (Fforce_subwindow_map): moved to - glyphs.c. + glyphs.c. (x_unmap_subwindow): new function to unmap X subwindows. (x_map_subwindow): new function to map X subwindows. (x_subwindow_instantiate): new function to instantiate X - subwindows. + subwindows. (x_resize_subwindow): new function to resize X subwindows. (console_type_create_glyphs_x): add subwindow functions. (image_instantiator_format_create_glyphs_x): add device - multi-methods for xpm, xbm and subwindow. + multi-methods for xpm, xbm and subwindow. * glyphs.el (subwindow-xid): old alias for new subwindow functions. (subwindow-width): ditto. (subwindow-height): ditto. * glyphs-msw.c (mswindows_widget_instantiate): new function for - generally instantiating ms subwindows. Used by - mswindows_*_instantiate. + generally instantiating ms subwindows. Used by + mswindows_*_instantiate. (mswindows_edit_instantiate): instantiate an edit field on a - mswindows frame. + mswindows frame. 1998-11-04 Andy Piper @@ -37227,65 +38256,65 @@ * redisplay.h: declare new functions. * redisplay-x.c (x_output_display_block): call - redisplay_clear_region rather than x_clear_region. + redisplay_clear_region rather than x_clear_region. (x_output_string): ditto. (x_output_pixmap): ditto. (x_clear_to_window_end): ditto. (x_output_eol_cursor): ditto. (x_clear_region): only do X specific things. other duties handled - in redisplay_clear_region. + in redisplay_clear_region. * redisplay-tty.c (tty_clear_region): do tty specific things - some - duties moved to redisplay_clear_region. + duties moved to redisplay_clear_region. * redisplay-output.c (clear_left_border): use - redisplay_clear_region instead of device method. + redisplay_clear_region instead of device method. (clear_right_border): ditto. (output_display_line): ditto. (redisplay_output_subwindow): ditto. (redisplay_clear_top_of_window): ditto. (redisplay_clear_region): perform duties previously handled by - device methods. call the appropriate device method at the - end. unmap subwindows if necessary. + device methods. call the appropriate device method at the + end. unmap subwindows if necessary. * redisplay-msw.c (mswindows_output_string): use - redisplay_clear_region instead of mswindows_clear_region. + redisplay_clear_region instead of mswindows_clear_region. (mswindows_clear_to_window_end): ditto. (mswindows_output_display_block): output subwindows when required. (mswindows_clear_region): only do mswindows specific things, - everything else is now handled in redisplay_clear_region. + everything else is now handled in redisplay_clear_region. * gui.h: add item id hash defines and declare function prototypes. * gui.c (mark_gui_item): new function for marking gui_items. (gui_item_hash): generic hash function for generating command ids - for gui_items. + for gui_items. * gui-msw.c: new file. (mswindows_handle_gui_wm_command): new function to handle widget - callbacks. + callbacks. * glyphs.h (MAYBE_IIFORMAT_DEVMETH): new function for device - multi-methods. + multi-methods. (IIFORMAT_HAS_SHARED_METHOD): ditto. (DEFINE_DEVICE_IIFORMAT): ditto. (INITIALIZE_DEVICE_IIFORMAT): ditto. (struct Lisp_Image_Instance): add widget and subwindow data plus - appropriate access functions. + appropriate access functions. * glyphs.c (decode_device_ii_format): new function for decoding - image instantiator functions based on a device type as well as an - image format. + image instantiator functions based on a device type as well as an + image format. (decode_image_instantiator_format): just call - decode_device_ii_format with nil device. + decode_device_ii_format with nil device. (add_entry_to_device_ii_format_list): new function for per device - method instances. + method instances. (add_entry_to_image_instantiator_format_list): just call - add_entry_to_device_ii_format_list with nil device. + add_entry_to_device_ii_format_list with nil device. (check_valid_vector): new function. (instantiate_image_instantiator): instantiate using per-format - method and then per-format-per-device method (device - multi-methods). signal an error if neither is possible. + method and then per-format-per-device method (device + multi-methods). signal an error if neither is possible. (mark_image_instance): cope with subwindows and widgets. (print_image_instance): ditto. (image_instance_equal): ditto. @@ -37295,83 +38324,83 @@ (glyph_height_internal): ditto. (xpm_instantiate): removed because of device multi-methods. (mark_subwindow_cachels): new cachel functions for caching - instantiated subwindows on a per-frame basis. mostly copied from - glyph cachel functions. + instantiated subwindows on a per-frame basis. mostly copied from + glyph cachel functions. (update_subwindow_cachel_data): ditto. (add_subwindow_cachel): ditto. (get_subwindow_cachel_index): ditto. (reset_subwindow_cachels): ditto. (mark_subwindow_cachels_as_not_updated): ditto. (unmap_subwindow): generic unmapping of subwindows based on cachel - data. + data. (map_subwindow): ditto. (initialize_subwindow_image_instance): generic initialisation of - subwindow data. + subwindow data. (syms_of_glyphs): add widget keywords. * glyphs-x.h (struct x_subwindow_data): convert Lisp_Subwindow to - x_subwindow_data. + x_subwindow_data. 1998-11-04 Andy Piper * glyphs-widget.c: new file for instantiating widget type glyphs. (widget_possible_dest_types): new general dest type function for - widgets. + widgets. (widget_validate): ditto. (initialize_widget_image_instance): ditto (widget_instantiate): ditto. Sets up fg/bg, gui_item parsing - before handing on control to device multi-methods. + before handing on control to device multi-methods. (syms_of_glyphs_widget): new function. (image_instantiator_format_create_glyphs_widget): new function, - added placeholders for button, edit, combo, scrollbar + added placeholders for button, edit, combo, scrollbar (vars_of_glyphs_widget): new function. * glyphs-msw.h (WIDGET_INSTANCE_MSWINDOWS_HANDLE): new define for - storing window ids of widgets. + storing window ids of widgets. * glyphs-msw.c (mswindows_finalize_image_instance): cope with - deletion of widget and subwindow glyphs. + deletion of widget and subwindow glyphs. (mswindows_unmap_subwindow): new device function for unmapping - subwindows on a msw frame. + subwindows on a msw frame. (mswindows_map_subwindow): ditto. (mswindows_register_image_instance): register instantiated widgets - with the widget hashtable. + with the widget hashtable. (mswindows_button_instantiate): instantiate a button type widget - on an msw frame. + on an msw frame. (mswindows_subwindow_instantiate): instanttiate a subwindow on a - mswindows frame. + mswindows frame. (image_instantiator_format_create_glyphs_mswindows): add device - multi-methods for xbm, xpm, subwindow, edit and button. + multi-methods for xbm, xpm, subwindow, edit and button. * frame.h (struct frame): add subwindow_cachels dynarr for caching - information about subwindows visible on the current frame. used by - redisplay_clear_region to unmap subwindows as required. + information about subwindows visible on the current frame. used by + redisplay_clear_region to unmap subwindows as required. * frame.c (mark_frame): mark subwindow_cachels. (allocate_frame_core): instantiate subwindow_cachels. * frame-msw.c (mswindows_init_frame_1): instntiate and mark the - widget hashtable. + widget hashtable. * event-msw.c (mswindows_wnd_proc): add call to - mswindows_handle_gui_wm_command to handle widget callbacks. + mswindows_handle_gui_wm_command to handle widget callbacks. * emacs.c (main_1): add calls to glyphs-widget initialisation - routines. + routines. * console.h (struct console_methods): add - unmap/map_subwindow_method for use be redisplay_clear_region to - map and unmap subwindows. Remove xpm and xbm stuff - now dealt - with by image instantiator multi-methods. Add - resize_subwindow_method. + unmap/map_subwindow_method for use be redisplay_clear_region to + map and unmap subwindows. Remove xpm and xbm stuff - now dealt + with by image instantiator multi-methods. Add + resize_subwindow_method. * console-stream.c (stream_clear_region): change signature to - match new generic clear region function. + match new generic clear region function. * Makefile.in.in: add glyphs-widget.o to list of objects. * console-msw.h (struct mswindows_frame): add widget hashtable for - wiring command ids to callbacks. + wiring command ids to callbacks. 1998-12-16 Andy Piper @@ -37435,7 +38464,7 @@ 1998-12-09 Andy Piper * glyphs-msw.c (init_image_instance_from_xbm_inline): don't use - XSETINT for assigning lisp objects. + XSETINT for assigning lisp objects. 1998-12-07 Martin Buchholz @@ -37465,7 +38494,7 @@ 1998-12-09 Andy Piper * menubar-msw.c (mswindows_handle_wm_command): add back in checks - that got removed in the merge + that got removed in the merge 1998-11-30 Greg Klanderman @@ -38431,7 +39460,7 @@ * config.h.in: ditto. * s/cygwin32.h: rearrange declarations to cope with cygwin - b20. Include cygwin32/version.h if it exists. + b20. Include cygwin32/version.h if it exists. 1998-09-20 Jonathan Harris @@ -38584,7 +39613,7 @@ 1998-08-28 Hrvoje Niksic * event-Xt.c (emacs_Xt_mapping_action): Check for device being - deleted. + deleted. (x_event_to_emacs_event): Ditto. (emacs_Xt_handle_focus_event): Ditto. (emacs_Xt_handle_magic_event): Ditto. @@ -38638,7 +39667,7 @@ 1998-08-30 Hrvoje Niksic * undo.c (undo_prelude): Test last-undo-buffer against base - buffer. + buffer. * insdel.c (MAP_INDIRECT_BUFFERS): Use it. @@ -38759,7 +39788,7 @@ 1998-07-29 P. E. Jareth Hein * glyphs-eimage.c (png_instantiate): Add proper handling for background - colors taken from the default face. Also correct a thinko in + colors taken from the default face. Also correct a thinko in transparency (not alpha) handling. 1998-07-23 Martin Buchholz @@ -39212,7 +40241,7 @@ 1998-06-12 Hrvoje Niksic * alloc.c (make_float): Remove useless initialization of `next' - field. + field. (make_pure_float): Ditto. * lisp.h (struct Lisp_Float): Rename `next' to `__unused__next'. @@ -39568,7 +40597,7 @@ to request returning motion in pixels. (Fvertical_motion_pixels): Remove, functionality merged into Fvertical_motion. - * window.c (window_scroll): call Fvertical_motion with 3 arguments. + * window.c (window_scroll): call Fvertical_motion with 3 arguments. (Fmove_to_window_line): ditto. * lisp.h: Change declaration for Fvertical_motion. @@ -40955,7 +41984,7 @@ 1998-05-02 Hrvoje Niksic * fileio.c (close_stream_unwind): Renamed to delete_stream_unwind. - Delete the stream. + Delete the stream. (Finsert_file_contents_internal): Delete STREAM after use. (Fmake_temp_name): Improve randomness of generated file names. (Fmake_temp_name): Don't initialize COUNT if in temacs. @@ -41455,7 +42484,7 @@ * event-msw.c: if HAVE_MSG_SELECT is defined use unixoid event stream tye callbacks and select() on events rather than MWFMO. - Added event handling for tooltip messages. If you have this + Added event handling for tooltip messages. If you have this special select then all process support works under cygwin. * frame-msw.c: add support for four toolbars. @@ -43311,7 +44340,7 @@ 1998-03-16 Hrvoje Niksic * lread.c: New macro, to avoid exposing an lstream to Lisp error - handlers. + handlers. (reader_nextchar): Use it. (read1): Ditto. @@ -43890,8 +44919,8 @@ Tue Feb 17 12:50:37 1998 Andy Piper * Makefile.in.in: make sure clean removes msw executables. This - prevents the build stalling after puresize has been adjusted. Add - file-coding.o to list of objects. + prevents the build stalling after puresize has been adjusted. Add + file-coding.o to list of objects. * buffer.c: * buffer.h: @@ -43917,15 +44946,15 @@ * 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, - ccl. (setup_eol_coding_systems) add the eol type to the subsidiary - coding system mnemonics so that it shows on the modeline, - currently (B) for unix style (T) for mac and dos styles. + mule-coding.c. The mule case is unchanged. The non-mule case + removes coding relating to other charsets - iso2022, big5, sjis, + ccl. (setup_eol_coding_systems) add the eol type to the subsidiary + coding system mnemonics so that it shows on the modeline, + currently (B) for unix style (T) for mac and dos styles. * fileio.c: remove #ifdef MULE's from stuff that relates to - file-coding. include file-coding.h rather than mule-coding.h where - applicable. FSFMACS_SPEEDY_INSERT is gone since file coding is + file-coding. include file-coding.h rather than mule-coding.h where + applicable. FSFMACS_SPEEDY_INSERT is gone since file coding is always on. * sheap.c: (more_static_core) remove spurious \n's from error @@ -43949,7 +44978,7 @@ 1998-02-21 Greg Klanderman * device-x.c (x_init_device): allow `x-emacs-application-class' to - be nil prior to connecting to the X server. When this is the + be nil prior to connecting to the X server. When this is the case, the application class is chosen based on whether the user has any resources with application class `XEmacs' set in the resource database. @@ -44067,7 +45096,7 @@ 1998-02-18 Didier Verna * redisplay.c: - (generate_formatted_string_db): new flag to distinguish a modeline + (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 amount. (add_string_to_fstring_db_runes): completely rewrote this function @@ -44425,7 +45454,7 @@ * device-msw.c: * event-msw.c: - * frame-msw.c: + * 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. @@ -44473,7 +45502,7 @@ the code. * mule-ccl.c (ccl_driver): Set initial values of variables to shut up - the compiler and to give better error message if a quit happens before + the compiler and to give better error message if a quit happens before any ccl_code is generated. 1998-01-28 SL Baur @@ -44691,12 +45720,12 @@ 1998-01-12 Hrvoje Niksic * mule-ccl.c (Fccl_execute_on_string): Use Dynar_free to free a - Dynarr. + Dynarr. 1998-01-13 Hrvoje Niksic * profile.c (vars_of_profile): New variable - `call-count-profile-table'. + `call-count-profile-table'. (Fclear_profiling_info): Clear call-count-profile-table. * eval.c (funcall_recording_as): Use it. @@ -44784,10 +45813,10 @@ 1998-01-08 Andy Piper * lread.c: guess load path if its not set just like the dumped - version does. + version does. * doc.c: guess doc path if its not set just like the dumped - version does + version does Thu Jan 08 09:42:36 1998 Andy Piper @@ -45104,7 +46133,7 @@ * abbrev.c (Fexpand_abbrev): Ditto. * dired.c (file_name_completion): Use Qzero instead of - make_int(0). + make_int(0). * fileio.c (Finsert_file_contents_internal): Use report_file_error() to report reading error. @@ -45114,7 +46143,7 @@ FSF 20.2. * abbrev.c (Fexpand_abbrev): Return Vlast_abbrev, like in FSF - 20.2. + 20.2. 1997-12-16 Hrvoje Niksic @@ -45137,7 +46166,7 @@ 1997-12-15 Hrvoje Niksic * fileio.c (Finsert_file_contents_internal): Use make_int when - checking for overflow. + checking for overflow. (Finsert_file_contents_internal): Use EXTERNAL_LIST_LOOP. (Ffind_file_name_handler): Ditto. @@ -45218,7 +46247,7 @@ * msw-proc.c: added emulation for middle mouse button by chording left and right buttons * event-msw.c: added lisp variables for resize behavior and middle - button emulation thresholds + button emulation thresholds * msw-proc.c: {un}map-frame-hook now are not called directly from the window procedure, rather from magic event handler. * Formulated golden rule for calling lisp from window procedure: @@ -45256,7 +46285,7 @@ 1997-12-12 Hrvoje Niksic * callint.c (quotify_arg): Don't quotify vectors, keywords, - bit-vectors and lambdas. + bit-vectors and lambdas. (Fquote_maybe): New subr, from quotify_arg. (quotify_args): Use it. (Fcall_interactively): Ditto. @@ -45277,15 +46306,15 @@ (pixmap_to_lisp_data): Ditto for Fbuffer_substring. * bytecode.c (Fbyte_code): Use Qnil instead of Fcurrent_buffer() - when calling functions that use decode_buffer() internally -- it - is faster. + when calling functions that use decode_buffer() internally -- it + is faster. Change done for Fgoto_char, Fchar_after, Ffollowing_char, - Fpreceding_char, Findent_to, Feolp, Feobp, Fbolp, Fbobp, - Fforward_char, Fforward_word, Fskip_chars_forward, - Fskip_chars_backward, Fforward_line, Fbuffer_substring, - Fdelete_region, Fnarrow_to_region, Fwiden, Fend_of_line, Fupcase - and Fdowncase. + Fpreceding_char, Findent_to, Feolp, Feobp, Fbolp, Fbobp, + Fforward_char, Fforward_word, Fskip_chars_forward, + Fskip_chars_backward, Fforward_line, Fbuffer_substring, + Fdelete_region, Fnarrow_to_region, Fwiden, Fend_of_line, Fupcase + and Fdowncase. 1997-12-11 Jonathan Harris , Kirill M. Katsnelson @@ -45417,7 +46446,7 @@ 1997-12-04 Jonathon Harris * event-msw.c, faces.c, msw-proc.c: - Frame resizing happens in multiples of the default character size. + Frame resizing happens in multiples of the default character size. * frame-msw.c: mswindows_set_frame_size() and mswindows_set_frame_properties() now call AdjustWindowRect to @@ -45452,7 +46481,7 @@ menubars are used. * menubar-x.c: change #ifdef LWLIB_MENUBARS_MOTIF to - #if defined LWLIB_MENUBARS_LUCID || defined LWLIB_MENUBARS_MOTIF + #if defined LWLIB_MENUBARS_LUCID || defined LWLIB_MENUBARS_MOTIF around code for incremental menu build. * event-stream.c: Changed HAVE_MENUBARS to HAVE_MENUBARS_LUCID in @@ -45479,7 +46508,7 @@ 1997-12-01 Hrvoje Niksic * cmdloop.c (default_error_handler): Respect - errors-deactivate-region; use display-error. + errors-deactivate-region; use display-error. * editfns.c (vars_of_editfns): New variable user-full-name. (init_editfns): Initialize it. @@ -45487,7 +46516,7 @@ (vars_of_editfns): Docfixes. * dired.c (Fdirectory_files): Use FORMAT_FILENAME instead of - FORMAT_BINARY. + FORMAT_BINARY. (make_directory_hash_table): Ditto. (file_name_completion): Bind `completion-ignore-case' to t under MS Windows. @@ -45497,7 +46526,7 @@ 1997-11-30 Hrvoje Niksic * doc.c (Fsubstitute_command_keys): Don't use - Vprin1_to_string_buffer. + Vprin1_to_string_buffer. * keymap.c (describe_map_tree): Accept a BUFFER argument. (describe_map): Ditto. @@ -45510,7 +46539,7 @@ (signal_after_change): Ditto. * buffer.c (Fkill_buffer): Don't treat Vprin1_to_string_buffer - specially. + specially. (complex_vars_of_buffer): Ditto. * print.c (Ferror_message_string): Use Vprin1_to_string_stream. @@ -45544,7 +46573,7 @@ (file_name_completion): Allow errors. * line-number.c (invalidate_line_number_cache): Would lose in - precence of Finsert_before_markers. + precence of Finsert_before_markers. (narrow_line_number_cache): Only mark LINE_NUMBER_BEGV as dirty. (buffer_line_number): Recalculate LINE_NUMBER_BEGV on demand. (buffer_line_number): Would ignore LINE_NUMBER_FAR. @@ -45724,7 +46753,7 @@ 1997-11-19 Didier Verna * emacs.c (main_1): Added the missing argmatch call to check - for the '-h' option. + for the '-h' option. 1997-11-18 SL Baur @@ -45910,10 +46939,10 @@ * mule-charset.c: Added preliminary support for charset Ids. * redisplay-msw.c (separate_textual_runs): Synched with FSF 20.2 - ccl API. + ccl API. * redisplay-x.c (separate_textual_runs): Synched with FSF 20.2 ccl - API. + API. * mule-coding.c: Synched with FSF 20.2 ccl API. @@ -46052,7 +47081,7 @@ * redisplay.c (window_line_number): Restored. * line-number.c (allocate_line_number_cache): Account for - narrowing. + narrowing. (buffer_line_number): New function. * line-number.c (get_nearest_line_number): New function. @@ -46068,7 +47097,7 @@ (save_restriction_restore): Ditto. * insdel.c (buffer_insert_string_1): Invalidate cache for - insertion. + insertion. (buffer_delete_range): Invalidate cache for deletion. * line-number.c: New file. @@ -46287,14 +47316,14 @@ * dired.c (make_directory_hash_table): Ditto. * fileio.c (Ffile_truename): Use `make_ext_string' instead of - `make_string'. + `make_string'. 1997-11-01 Hrvoje Niksic * database.c (CONCHECK_DATABASE): Define. * dired.c (Fdirectory_files): Use `make_ext_string' instead of - `make_string', to avoid crashes under Mule. + `make_string', to avoid crashes under Mule. (file_name_completion): Use `make_ext_string'. * database.c (new_database): Renamed to `allocate_database', as @@ -46321,7 +47350,7 @@ 1997-11-01 Hrvoje Niksic * fileio.c (Finsert_file_contents_internal): Fix misleading - comment. + comment. 1997-10-31 Kyle Jones @@ -46648,7 +47677,7 @@ 1997-10-15 Olivier Galibert * s/irix5-0.h: Removed -G 0 from LD_SWITCH_SYSTEM. .sbss sections - are supported since unexelfsgi.c upgrade. + are supported since unexelfsgi.c upgrade. 1997-10-16 Kyle Jones @@ -46689,7 +47718,7 @@ 1997-10-15 Olivier Galibert * lisp.h (MANY): Bump SUBR_MAX_ARGS to 12 and add corresponding - DEFUN_n macros. + DEFUN_n macros. 1997-10-13 Stephen J. Turnbull @@ -46861,7 +47890,7 @@ 1997-10-03 Karl M. Hegbloom * fns.c: Add some cross references between destructive and - non-destructive versions of similar functions. + non-destructive versions of similar functions. Fri Oct 3 12:28:08 1997 Kyle Jones @@ -46952,10 +47981,10 @@ (stream_canonicalize_console_connection): Ditto. * fns.c (Fmember): Use internal_equal, to avoid a necessary - funcall and NILP check. + funcall and NILP check. (Fold_member): Ditto for internal_old_equal. (Fassoc): Use XCAR when we know we deal with a cons. Use - internal_equal. Removed tem. + internal_equal. Removed tem. (Fold_assoc): Ditto. (Fassq): Use XCAR. (Frassoc): Use internal_equal; remove tem. @@ -47116,7 +48145,7 @@ 1997-09-10 Hrvoje Niksic * event-stream.c (inhibit_input_event_recording): New boolean - variable. + variable. (Fnext_event): Use it. 1997-09-13 Hrvoje Niksic @@ -47211,7 +48240,7 @@ 1997-07-25 P E Jareth Hein * xselect.c (x_atom_to_symbol): Fixed a memory corruption bug - where a possibly MULEified string was getting freed before use. + where a possibly MULEified string was getting freed before use. 1997-07-21 SL Baur @@ -47247,7 +48276,7 @@ 1997-07-10 Hrvoje Niksic * fileio.c (Finsert_file_contents_internal): Handle non-regular - files. + files. 1997-07-12 Steven L Baur @@ -47433,7 +48462,7 @@ 1997-06-20 Olivier Galibert - * frame-x.c, EmacsFrame.c, menubar-x.c, redisplay-x.c, scrollbar-x.c: + * frame-x.c, EmacsFrame.c, menubar-x.c, redisplay-x.c, scrollbar-x.c: Make 64 bit clean. 1997-06-19 Martin Buchholz @@ -47736,8 +48765,8 @@ Thu May 29 03:00:16 1997 Kyle Jones * frame.c (change_frame_size_1): - Drop code that returns immediately if the old frame - size is equal to the new. + Drop code that returns immediately if the old frame + size is equal to the new. Leave the minibuffer height the same if the frame has been initialized, and the minibuffer height is tall enough to display at least one line of text in the default @@ -47768,13 +48797,13 @@ 1997-05-21 Steven L Baur * editfns.c (format-time-string): Update DOCstring. Make time - parameter optional. + parameter optional. Wed May 21 11:58:17 1997 Kyle Jones * insdel.c (signal_first_change): - record the current buffer for the unwind instead of the - buffer that's about to become the current buffer. + 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 @@ -47891,7 +48920,7 @@ * menubar-x.c (pre_activate_hook): set in_menu_callback around call to call to - menu_item_descriptor_to_widget_value. + menu_item_descriptor_to_widget_value. * event-stream.c (Fnext_event): signal error if in_menu_callback non-nil to avoid @@ -47958,8 +48987,8 @@ Sat Apr 12 01:59:14 1997 Kyle Jones * glyphs-x.c, glyphs.c, glyphs.h: Added domain parameter to all - image *_instantiate functions so that the domsin is available to - specifier lookups in the various instantiator functions. Passed + image *_instantiate functions so that the domsin is available to + specifier lookups in the various instantiator functions. Passed domain argument to extract_xpm_color_names for the Fspecifier_instance call. @@ -48005,7 +49034,7 @@ Mon Apr 7 18:12:26 1997 David Moore * xmu.c: Renamed local `initialized' variable to `hex_initialized' - and don't assign to static, as some compilers crash. + and don't assign to static, as some compilers crash. (initHexTable): Use it. (XmuReadBitmapData): Use it. @@ -48147,7 +49176,7 @@ (POP_BACKTRACE): Ditto. * eval.c (Fcommand_execute): Use them and fix problem with - backtrace_list build ordering requirements for profiling code. + backtrace_list build ordering requirements for profiling code. (Feval): Ditto. (funcall_recording_as): Ditto. @@ -48187,7 +49216,7 @@ the buffer. * insdel.c (prepare_to_modify_buffer): GC protect against - lock_file() killing the buffer. + lock_file() killing the buffer. Fri Mar 21 19:11:15 1997 Steven L Baur @@ -48229,7 +49258,7 @@ Sat Mar 15 14:21:39 1997 David Moore * fileio.c (Fdo_auto_save): Protect against file handlers which - may kill the buffer being saved or otherwise modify Vbuffer_alist. + may kill the buffer being saved or otherwise modify Vbuffer_alist. Sat Mar 15 15:32:51 1997 Steven L Baur @@ -48278,7 +49307,7 @@ Sun Mar 9 21:46:53 1997 Tomasz J. Cholewo * minibuf.c (regexp_ignore_completion_p): Reverse meaning of - completion-regexp-list. + completion-regexp-list. Thu Mar 6 19:15:29 1997 Steven L Baur diff -r 71bf2c5667ba -r 66411359ce4e src/Makefile.in.in --- a/src/Makefile.in.in Sat Oct 25 20:35:36 2008 +0900 +++ b/src/Makefile.in.in Sat Oct 25 21:40:46 2008 +0900 @@ -649,6 +649,7 @@ @echo "Building finder database ..." $(RM) $(LISP)/finder-inf.el $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \ + -eval "(setq lisp-directory \"$(LISP)\")" \ -l finder -f finder-compile-keywords @echo "Building finder database ...(done)" diff -r 71bf2c5667ba -r 66411359ce4e src/buffer.c diff -r 71bf2c5667ba -r 66411359ce4e src/casetab.c --- a/src/casetab.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/casetab.c Sat Oct 25 21:40:46 2008 +0900 @@ -48,13 +48,28 @@ or vice versa, both characters will have the same entry in the canon table. - (4) `equiv' lists the "equivalence classes" defined by `canon'. Imagine + (4) `eqv' lists the "equivalence classes" defined by `canon'. Imagine that all characters are divided into groups having the same `canon' - entry; these groups are called "equivalence classes" and `equiv' lists - them by linking the characters in each equivalence class together in a - circular list. + entry; these groups are called "equivalence classes" and `eqv' lists them + by linking the characters in each equivalence class together in a + circular list. That is, to find out all all the members of a given char's + equivalence classe, you need something like the following code: - `canon' is used when doing case-insensitive comparisons. `equiv' is + (let* ((char ?i) + (original-char char) + (standard-case-eqv (case-table-eqv (standard-case-table)))) + (loop + with res = (list char) + until (eq (setq char (get-char-table char standard-case-eqv)) + original-char) + do (push char res) + finally return res)) + + (Where #'case-table-eqv doesn't yet exist, and probably never will, given + that the C code needs to keep it in a consistent state so Lisp can't mess + around with it.) + + `canon' is used when doing case-insensitive comparisons. `eqv' is used in the Boyer-Moore search code. */ diff -r 71bf2c5667ba -r 66411359ce4e src/charset.h --- a/src/charset.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/charset.h Sat Oct 25 21:40:46 2008 +0900 @@ -567,12 +567,20 @@ UNICODE_UTF_16, UNICODE_UTF_8, UNICODE_UTF_7, - UNICODE_UCS_4 + UNICODE_UCS_4, + UNICODE_UTF_32 }; void encode_unicode_char (Lisp_Object USED_IF_MULE (charset), int h, int USED_IF_MULE (l), unsigned_char_dynarr *dst, - enum unicode_type type, unsigned int little_endian); + enum unicode_type type, unsigned int little_endian, + int write_error_characters_as_such); + +#define UNICODE_ERROR_OCTET_RANGE_START 0x200000 + +#define valid_utf_16_first_surrogate(ch) (((ch) & 0xFC00) == 0xD800) +#define valid_utf_16_last_surrogate(ch) (((ch) & 0xFC00) == 0xDC00) +#define valid_utf_16_surrogate(ch) (((ch) & 0xF800) == 0xD800) void set_charset_registries(Lisp_Object charset, Lisp_Object registries); diff -r 71bf2c5667ba -r 66411359ce4e src/chartab.c --- a/src/chartab.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/chartab.c Sat Oct 25 21:40:46 2008 +0900 @@ -566,25 +566,32 @@ sorts of values. The different char table types are `category' - Used for category tables, which specify the regexp categories - that a character is in. The valid values are nil or a - bit vector of 95 elements. Higher-level Lisp functions are - provided for working with category tables. Currently categories + Used for category tables, which specify the regexp categories that a + character is in. The valid values are nil or a bit vector of 95 + elements, and values default to nil. Higher-level Lisp functions + are provided for working with category tables. Currently categories and category tables only exist when Mule support is present. `char' - A generalized char table, for mapping from one character to - another. Used for case tables, syntax matching tables, - `keyboard-translate-table', etc. The valid values are characters. + A generalized char table, for mapping from one character to another. + Used for case tables, syntax matching tables, + `keyboard-translate-table', etc. The valid values are characters, + and the default result given by `get-char-table' if a value hasn't + been set for a given character or for a range that includes it, is + ?\x00. `generic' - An even more generalized char table, for mapping from a - character to anything. + An even more generalized char table, for mapping from a character to + anything. The default result given by `get-char-table' is nil. `display' - Used for display tables, which specify how a particular character - is to appear when displayed. #### Not yet implemented. + Used for display tables, which specify how a particular character is + to appear when displayed. #### Not yet implemented; currently, the + display table code uses generic char tables, and it's not clear that + implementing this char table type would be useful. `syntax' Used for syntax tables, which specify the syntax of a particular character. Higher-level Lisp functions are provided for - working with syntax tables. The valid values are integers. + working with syntax tables. The valid values are integers, and the + default result given by `get-char-table' is the syntax code for + `inherit'. */ (type)) { diff -r 71bf2c5667ba -r 66411359ce4e src/compiler.h --- a/src/compiler.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/compiler.h Sat Oct 25 21:40:46 2008 +0900 @@ -210,19 +210,24 @@ # endif /* GCC_VERSION >= NEED_GCC (2, 5, 0) */ #endif /* ATTRIBUTE_CONST */ -/* Unused declarations; g++ and icc do not support this. */ /* NOTE: These macros MUST be named UNUSED (exactly) or something prefixed with USED_IF_, or DEFUN docstrings will be parsed incorrectly. See comments in make_docfile.c (write_c_args). You'd think that this wouldn't happen, but unfortunately we do indeed have some arguments of DEFUNs unused for GNU compatibility or because features are missing. + + #### At one time, __attribute__ ((unused)) confused G++. We don't know + which versions. Please report problems and fix conditionals. + #### A similar issue arose with the Intel CC. We know that v7 didn't + work and v9 does. Let us know if v8 works or not, please. + See . */ #ifndef UNUSED_ARG # define UNUSED_ARG(decl) unused_##decl #endif #ifndef UNUSED -# if defined(__GNUC__) && !defined(__cplusplus) && !defined(__INTEL_COMPILER) +# if defined(__GNUC__) && (!defined(__INTEL_COMPILER) || __INTEL_COMPILER >= 800) # define ATTRIBUTE_UNUSED __attribute__ ((unused)) # else # define ATTRIBUTE_UNUSED diff -r 71bf2c5667ba -r 66411359ce4e src/config.h.in --- a/src/config.h.in Sat Oct 25 20:35:36 2008 +0900 +++ b/src/config.h.in Sat Oct 25 21:40:46 2008 +0900 @@ -91,6 +91,9 @@ /* Program name */ #undef EMACS_PROGNAME +/* Name of the link to the program to be used with #! scripts */ +#undef SHEBANG_PROGNAME + /* Allow s&m files to differentiate OS versions without having multiple files to maintain. */ #undef OS_RELEASE @@ -209,12 +212,20 @@ /* Compile with support for fontconfig? */ #undef HAVE_FONTCONFIG +/* Was the spelling of FcConfigGetRescanInterval corrected in this + fontconfig version? */ +#undef HAVE_FCCONFIGGETRESCANINTERVAL + +/* Was the spelling of FcConfigSetRescanInterval corrected in this + fontconfig version? */ +#undef HAVE_FCCONFIGSETRESCANINTERVAL + /* Compile with support for Xft? */ #undef USE_XFT /* Per-widget stuff will go away? */ #undef USE_XFT_MENUBARS #undef USE_XFT_TABS -#undef USE_XFT_GAUGE +#undef USE_XFT_GAUGES /* Defines for building X applications */ #ifdef HAVE_X_WINDOWS @@ -864,6 +875,7 @@ "deprecated" in favor of Microsoft-specific "secure" ones (!) This must go *before* the inclusion of any system files. */ #define _CRT_SECURE_NO_DEPRECATE +#define _CRT_NONSTDC_NO_DEPRECATE #endif /* alloca twiddling. @@ -1078,7 +1090,8 @@ Use `inline static' to define inline functions in .c files. See the Internals manual for examples and more information. */ -#if defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs) +#if (defined ( __STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ + || defined (__cplusplus) || ! defined (__GNUC__) || ! defined(emacs) # define INLINE_HEADER inline static #elif defined (DONT_EXTERN_INLINE_HEADER_FUNCTIONS) # define INLINE_HEADER inline diff -r 71bf2c5667ba -r 66411359ce4e src/console-gtk.c --- a/src/console-gtk.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/console-gtk.c Sat Oct 25 21:40:46 2008 +0900 @@ -39,6 +39,8 @@ DEFINE_CONSOLE_TYPE (gtk); +Lisp_Object Vgtk_seen_characters; + static int gtk_initially_selected_for_input (struct console *UNUSED (con)) { @@ -122,13 +124,11 @@ Lisp_Object key) { Lisp_Object char_to_associate = Qnil; - extern Lisp_Object Vcurrent_global_map, Qgtk_seen_characters, - Qcharacter_of_keysym; + extern Lisp_Object Vcurrent_global_map, Qcharacter_of_keysym; if (SYMBOLP(key)) { gchar *symbol_name; - guint keyval; DECLARE_EISTRING(ei_symname); eicpy_rawz(ei_symname, XSTRING_DATA(symbol_name(XSYMBOL(key)))); @@ -154,21 +154,22 @@ else { CHECK_CHAR(key); + char_to_associate = key; } - if (!(HASH_TABLEP(Qgtk_seen_characters))) + if (!(HASH_TABLEP(Vgtk_seen_characters))) { - Qgtk_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, + Vgtk_seen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL); } /* Might give the user an opaque error if make_lisp_hash_table fails, but it shouldn't crash. */ - CHECK_HASH_TABLE(Qgtk_seen_characters); + CHECK_HASH_TABLE(Vgtk_seen_characters); if (EQ(char_to_associate, Qnil) /* If there's no char to bind, */ || (XCHAR(char_to_associate) < 0x80) /* or it's ASCII */ - || !NILP(Fgethash(key, Qgtk_seen_characters, Qnil))) /* Or we've seen + || !NILP(Fgethash(key, Vgtk_seen_characters, Qnil))) /* Or we've seen it already, */ { /* then don't bind the key. */ @@ -176,8 +177,8 @@ } if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) - { - Fputhash(key, Qt, Qgtk_seen_characters); + { + Fputhash(key, Qt, Vgtk_seen_characters); Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); if (SYMBOLP(key)) { @@ -209,3 +210,10 @@ { REINITIALIZE_CONSOLE_TYPE (gtk); } + +void +vars_of_console_gtk (void) +{ + staticpro (&Vgtk_seen_characters); + Vgtk_seen_characters = Qnil; +} diff -r 71bf2c5667ba -r 66411359ce4e src/console-tty.c --- a/src/console-tty.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/console-tty.c Sat Oct 25 21:40:46 2008 +0900 @@ -219,9 +219,7 @@ xfree (tty_con->term_entry_buffer, char *); tty_con->term_entry_buffer = NULL; } -#ifdef NEW_GC - mc_free (tty_con); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (tty_con, struct tty_console *); #endif /* not NEW_GC */ CONSOLE_TTY_DATA (con) = NULL; diff -r 71bf2c5667ba -r 66411359ce4e src/database.c --- a/src/database.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/database.c Sat Oct 25 21:40:46 2008 +0900 @@ -31,6 +31,7 @@ #include "sysfile.h" #include "buffer.h" +#include "file-coding.h" #ifndef HAVE_DATABASE #error HAVE_DATABASE not defined!! @@ -181,11 +182,16 @@ 3, db->fname, db->funcs->get_type (db), db->funcs->get_subtype (db)); - write_fmt_string (printcharfun, "%s) 0x%x>", + write_fmt_string (printcharfun, "%s) ", (!DATABASE_LIVE_P (db) ? "closed" : (db->access_ & O_WRONLY) ? "writeonly" : - (db->access_ & O_RDWR) ? "readwrite" : "readonly"), - db->header.uid); + (db->access_ & O_RDWR) ? "readwrite" : "readonly")); + + write_fmt_string_lisp (printcharfun, "coding: %s ", 1, + XSYMBOL_NAME (XCODING_SYSTEM_NAME + (db->coding_system))); + + write_fmt_string (printcharfun, "0x%x>", db->header.uid); } static void @@ -281,9 +287,9 @@ keydatum = dbm_nextkey (db->dbm_handle)) { valdatum = dbm_fetch (db->dbm_handle, keydatum); - key = make_ext_string (keydatum.dptr, keydatum.dsize, + key = make_ext_string ((Extbyte *) keydatum.dptr, keydatum.dsize, db->coding_system); - val = make_ext_string (valdatum.dptr, valdatum.dsize, + val = make_ext_string ((Extbyte *) valdatum.dptr, valdatum.dsize, db->coding_system); call2 (func, key, val); } @@ -300,7 +306,7 @@ valdatum = dbm_fetch (db->dbm_handle, keydatum); return (valdatum.dptr - ? make_ext_string (valdatum.dptr, valdatum.dsize, + ? make_ext_string ((Extbyte *) valdatum.dptr, valdatum.dsize, db->coding_system) : Qnil); } @@ -654,7 +660,7 @@ if (NILP (codesys)) codesys = Vdatabase_coding_system; - codesys = get_coding_system_for_text_file (Vdatabase_coding_system, 1); + codesys = get_coding_system_for_text_file (codesys, 0); #ifdef HAVE_DBM if (NILP (type) || EQ (type, Qdbm)) diff -r 71bf2c5667ba -r 66411359ce4e src/depend --- a/src/depend Sat Oct 25 20:35:36 2008 +0900 +++ b/src/depend Sat Oct 25 21:40:46 2008 +0900 @@ -15,263 +15,263 @@ #endif #if defined(HAVE_MS_WINDOWS) -console-msw.o: $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h intl-auto-encap-win32.h opaque.h specifier.h systime.h syswindows.h -device-msw.o: $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h intl-auto-encap-win32.h objects-msw.h objects.h redisplay.h specifier.h sysdep.h systime.h syswindows.h -dialog-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h opaque.h redisplay.h specifier.h sysfile.h syswindows.h -dired-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h intl-auto-encap-win32.h ndir.h regex.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h -event-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h lstream.h menubar.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h window-impl.h window.h winslots.h -frame-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h -glyphs-msw.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lstream.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syswindows.h window-impl.h window.h winslots.h -gui-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h glyphs.h gui.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h -menubar-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h events.h frame-impl.h frame.h frameslots.h gui.h intl-auto-encap-win32.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h -objects-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h elhash.h insdel.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h syswindows.h -redisplay-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h syswindows.h window-impl.h window.h winslots.h -scrollbar-msw.o: $(LISP_H) conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h events.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h systime.h syswindows.h window-impl.h window.h winslots.h -select-msw.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h opaque.h redisplay.h select.h specifier.h syswindows.h -toolbar-msw.o: $(LISP_H) charset.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h syswindows.h toolbar.h window-impl.h window.h winslots.h +console-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h +device-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-msw.h objects.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h +dialog-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h +dired-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h +event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +glyphs-msw.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +objects-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h +redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +scrollbar-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +select-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h +toolbar-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h #endif #if defined(HAVE_XLIKE) event-xlike-inc.o: objects-xlike-inc.o: #endif #if defined(HAVE_X_WINDOWS) -EmacsFrame.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h +EmacsFrame.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h EmacsManager.o: $(CONFIG_H) EmacsManager.h EmacsManagerP.h compiler.h xintrinsicp.h xmmanagerp.h xmotif.h xmprimitivep.h EmacsShell-sub.o: $(CONFIG_H) EmacsShell.h EmacsShellP.h xintrinsic.h xintrinsicp.h EmacsShell.o: $(CONFIG_H) EmacsShell.h ExternalShell.h xintrinsicp.h -balloon-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h specifier.h xintrinsic.h +balloon-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h balloon_help.o: $(CONFIG_H) balloon_help.h compiler.h xintrinsic.h -console-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h process.h redisplay.h specifier.h xintrinsic.h -device-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdll.h sysfile.h systime.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h -dialog-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h events.h frame-impl.h frame.h frameslots.h gui.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window.h xintrinsic.h -frame-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gutter.h objects-impl.h objects-x-impl.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h -glyphs-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h lstream.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h sysfile.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h xmu.h -gui-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame.h glyphs.h gui.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h -intl-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h console-x.h console.h xintrinsic.h -menubar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h keymap.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h -objects-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h elhash.h font-mgr.h insdel.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h specifier.h xintrinsic.h -redisplay-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-x-impl.h console-x.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gutter.h mule-ccl.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h -scrollbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h redisplay.h scrollbar-x.h scrollbar.h specifier.h window-impl.h window.h winslots.h xintrinsic.h -select-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h objects-x.h objects.h opaque.h redisplay.h select-common.h select.h specifier.h systime.h xintrinsic.h xmotif.h -toolbar-x.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h conslots.h console-impl.h console-x-impl.h console-x.h console.h faces.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h toolbar-common.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h -xgccache.o: $(LISP_H) hash.h xgccache.h +console-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h +device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmu.h +dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h xintrinsic.h +frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h offix-types.h offix.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h xmu.h +glyphs-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h xmu.h +gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h +intl-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h console-x.h console.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xintrinsic.h +menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h font-mgr.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h +redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +scrollbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +select-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h xintrinsic.h xmotif.h +toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h +xgccache.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xgccache.h #endif #if defined(HAVE_TTY) -console-tty.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h elhash.h faces.h file-coding.h frame.h glyphs.h lstream.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systty.h window-impl.h window.h winslots.h -device-tty.o: $(LISP_H) charset.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame.h lstream.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h systty.h -event-tty.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h frame.h process.h redisplay.h specifier.h sysproc.h syssignal.h systime.h systty.h syswait.h -frame-tty.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h systime.h systty.h -objects-tty.o: $(LISP_H) charset.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h insdel.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h systty.h -redisplay-tty.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h faces.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h +console-tty.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h dumper.h elhash.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systty.h text.h vdb.h window-impl.h window.h winslots.h +device-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h text.h vdb.h +event-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h +frame-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systime.h systty.h text.h vdb.h +objects-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h +redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h #endif #if defined(HAVE_GTK) -console-gtk.o: $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h elhash.h process.h redisplay.h specifier.h -device-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gccache-gtk.h glyphs-gtk.h glyphs.h gtk-xemacs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h -dialog-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h events.h frame.h gui.h opaque.h redisplay.h scrollbar.h specifier.h systime.h window.h +console-gtk.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h +device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h +dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h events.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h emacs-marshals.o: hash.h emacs-widget-accessors.o: -event-gtk.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-gtk.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gtk-xemacs.h gui.h lstream.h menubar.h objects-gtk.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h window.h xintrinsic.h -frame-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gtk-xemacs.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h sysdll.h systime.h ui-gtk.h window-impl.h window.h winslots.h -gccache-gtk.o: $(LISP_H) gccache-gtk.h hash.h +event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-gtk.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gtk-xemacs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window.h xintrinsic.h +frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h +gccache-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-gtk.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h glade.o: bytecode.h -glyphs-gtk.o: $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h lstream.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h sysfile.h systime.h ui-gtk.h window-impl.h window.h winslots.h +glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysfile.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h gtk-glue.o: objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h specifier.h -gtk-xemacs.o: $(LISP_H) charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h event-gtk.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gtk-xemacs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -gui-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h frame.h gui.h opaque.h redisplay.h specifier.h -menubar-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h gui.h menubar.h opaque.h redisplay.h scrollbar.h specifier.h sysdll.h systime.h ui-gtk.h window-impl.h window.h winslots.h -native-gtk-toolbar.o: $(LISP_H) charset.h console-gtk.h console.h faces.h frame.h glyphs-gtk.h glyphs.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h -objects-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h insdel.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-xlike-inc.c objects.h specifier.h -redisplay-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h debug.h device-impl.h device.h devslots.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gccache-gtk.h glyphs-gtk.h glyphs.h gutter.h mule-ccl.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h sysproc.h syssignal.h systime.h window-impl.h window.h winslots.h -scrollbar-gtk.o: $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame-impl.h frame.h frameslots.h glyphs-gtk.h glyphs.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h window-impl.h window.h winslots.h -select-gtk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame.h opaque.h redisplay.h select-common.h select.h specifier.h systime.h -toolbar-gtk.o: $(LISP_H) conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h frame.h redisplay.h specifier.h toolbar-common.h +gtk-xemacs.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h event-gtk.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +gui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h +menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h +native-gtk-toolbar.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h console-gtk.h console.h dumper.h faces.h frame.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +objects-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-xlike-inc.c objects.h specifier.h symeval.h symsinit.h text.h vdb.h +redisplay-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h +scrollbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h +toolbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h toolbar-common.h vdb.h ui-byhand.o: gui.h -ui-gtk.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h elhash.h emacs-marshals.c emacs-widget-accessors.c event-gtk.h events.h faces.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h sysdll.h systime.h ui-byhand.c ui-gtk.h window-impl.h window.h winslots.h +ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h dumper.h elhash.h emacs-marshals.c emacs-widget-accessors.c event-gtk.h events.h faces.h gc.h general-slots.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h systime.h text.h ui-byhand.c ui-gtk.h vdb.h window-impl.h window.h winslots.h #endif #if defined(HAVE_DATABASE) -database.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h database.h sysfile.h +database.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h database.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h #endif #if defined(MULE) -mule-ccl.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h mule-ccl.h -mule-charset.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h elhash.h faces.h lstream.h mule-ccl.h objects.h specifier.h -mule-coding.o: $(LISP_H) charset.h coding-system-slots.h file-coding.h mule-ccl.h -mule-wnnfns.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h redisplay.h scrollbar.h sysdep.h window.h +mule-ccl.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +mule-charset.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h elhash.h faces.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h +mule-coding.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +mule-wnnfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h text.h vdb.h window.h #endif #if defined(EXTERNAL_WIDGET) ExternalClient-Xlib.o: extw-Xlib.h ExternalClient.o: $(CONFIG_H) ExternalClient.h ExternalClientP.h compiler.h extw-Xlib.h extw-Xt.h xintrinsicp.h ExternalShell.o: $(CONFIG_H) ExternalShell.h ExternalShellP.h compiler.h extw-Xlib.h extw-Xt.h xintrinsic.h xintrinsicp.h extw-Xlib.o: $(CONFIG_H) extw-Xlib.h -extw-Xt.o: $(CONFIG_H) extw-Xlib.h extw-Xt.h +extw-Xt.o: $(CONFIG_H) compiler.h extw-Xlib.h extw-Xt.h #endif -abbrev.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h insdel.h redisplay.h scrollbar.h syntax.h window.h -alloc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h -alloca.o: $(LISP_H) -alsaplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysfile.h -blocktype.o: $(LISP_H) blocktype.h -buffer.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h insdel.h intl-auto-encap-win32.h lstream.h ndir.h process.h redisplay.h scrollbar.h select.h specifier.h syntax.h sysdir.h sysfile.h syswindows.h window.h -bytecode.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h opaque.h redisplay.h scrollbar.h syntax.h window.h -callint.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h events.h insdel.h redisplay.h scrollbar.h systime.h window-impl.h window.h winslots.h -casefiddle.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h -casetab.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h opaque.h -chartab.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h syntax.h -cm.o: $(LISP_H) conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h frame.h lstream.h redisplay.h specifier.h systty.h -cmdloop.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-msw.h console.h device.h events.h frame.h intl-auto-encap-win32.h redisplay.h scrollbar.h specifier.h systime.h syswindows.h window.h -cmds.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h extents.h insdel.h syntax.h -console-stream.o: $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h systty.h window.h -console.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h sysdep.h systime.h systty.h window.h -data.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h sysfloat.h syssignal.h -debug.o: $(LISP_H) bytecode.h debug.h -device.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h keymap.h objects.h redisplay.h scrollbar.h specifier.h sysdep.h syssignal.h systime.h toolbar.h window.h -dgif_lib.o: $(LISP_H) gifrlib.h sysfile.h -dialog.o: $(LISP_H) conslots.h console-impl.h console.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h -dired.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h elhash.h intl-auto-encap-win32.h ndir.h opaque.h regex.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h -doc.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h insdel.h keymap.h lstream.h sysfile.h -doprnt.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h lstream.h -dragdrop.o: $(LISP_H) dragdrop.h -dump-data.o: $(LISP_H) dump-data.h -dumper.o: $(LISP_H) coding-system-slots.h console-stream.h console.h dump-data.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h specifier.h sysfile.h syswindows.h -dynarr.o: $(LISP_H) +abbrev.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h +alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h +alloca.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +alsaplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h +blocktype.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +buffer.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h syswindows.h text.h vdb.h window.h +bytecode.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h +callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h events.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h +casefiddle.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h +casetab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h +chartab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h +cm.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h +cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window.h +cmds.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h extents.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h +console-stream.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h systty.h text.h vdb.h window.h +console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h systty.h text.h vdb.h window.h +data.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h +debug.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h debug.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h text.h toolbar.h vdb.h window.h +dgif_lib.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +dialog.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h +dired.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h elhash.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h text.h vdb.h +doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +doprnt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +dragdrop.o: $(CONFIG_H) $(LISP_H) compiler.h dragdrop.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +dump-data.o: $(CONFIG_H) $(LISP_H) compiler.h dump-data.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +dumper.o: $(CONFIG_H) $(LISP_H) coding-system-slots.h compiler.h console-stream.h console.h dump-data.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h +dynarr.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h ecrt0.o: $(CONFIG_H) -editfns.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console.h device.h events.h frame.h insdel.h line-number.h ndir.h process.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h window.h -elhash.o: $(LISP_H) bytecode.h elhash.h opaque.h -emacs.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h console-msw.h console.h dump-data.h frame.h intl-auto-encap-win32.h paths.h process.h redisplay.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h -emodules.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h emodules.h file-coding.h frame.h insdel.h lstream.h redisplay.h scrollbar.h sysdep.h sysdll.h window.h -esd.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h -eval.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h frame.h lstream.h opaque.h profile.h redisplay.h scrollbar.h specifier.h window.h -event-Xt.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h sysproc.h syssignal.h systime.h systty.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h -event-stream.o: $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gui.h insdel.h keymap.h lstream.h macros.h menubar.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h syssignal.h systime.h window-impl.h window.h winslots.h -event-unixoid.o: $(LISP_H) conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h lstream.h process.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h -events.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h events.h extents.h frame-impl.h frame.h frameslots.h glyphs.h keymap.h lstream.h redisplay.h scrollbar.h specifier.h systime.h systty.h toolbar.h window-impl.h window.h winslots.h -extents.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console.h debug.h device.h elhash.h extents-impl.h extents.h faces.h frame.h glyphs.h gutter.h insdel.h keymap.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -faces.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -file-coding.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h insdel.h lstream.h opaque.h -fileio.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h device.h events.h file-coding.h frame.h insdel.h intl-auto-encap-win32.h lstream.h ndir.h process.h profile.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h window-impl.h window.h winslots.h -filelock.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h ndir.h paths.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h -filemode.o: $(LISP_H) sysfile.h -floatfns.o: $(LISP_H) sysfloat.h syssignal.h -fns.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h console.h device.h events.h extents.h frame.h insdel.h lstream.h opaque.h process.h redisplay.h sysfile.h sysproc.h syssignal.h systime.h -font-lock.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h syntax.h -font-mgr.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h font-mgr.h hash.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h xintrinsic.h -frame.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h menubar.h process.h redisplay.h scrollbar.h specifier.h systime.h toolbar.h window-impl.h window.h winslots.h -free-hook.o: $(LISP_H) hash.h -gc.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console-stream.h console.h device.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h lstream.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h systime.h window-impl.h window.h winslots.h -general.o: $(LISP_H) general-slots.h -getloadavg.o: $(LISP_H) sysfile.h syssignal.h -gif_io.o: $(LISP_H) gifrlib.h sysfile.h -glyphs-eimage.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h file-coding.h frame.h gifrlib.h glyphs.h lstream.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h sysfile.h window-impl.h window.h winslots.h -glyphs-shared.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h elhash.h faces.h frame.h glyphs.h imgproc.h insdel.h lstream.h opaque.h redisplay.h scrollbar.h specifier.h sysdep.h sysfile.h window-impl.h window.h winslots.h -glyphs-widget.o: $(LISP_H) bytecode.h charset.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame.h glyphs.h gui.h insdel.h lstream.h objects.h opaque.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -glyphs.o: $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gui.h insdel.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h sysfile.h window-impl.h window.h winslots.h -gmalloc.o: $(LISP_H) getpagesize.h sysdep.h -gpmevent.o: $(LISP_H) commands.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h gpmevent.h lstream.h process.h redisplay.h specifier.h sysdep.h sysproc.h syssignal.h systime.h systty.h -gui.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h elhash.h gui.h menubar.h redisplay.h -gutter.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -hash.o: $(LISP_H) hash.h -hftctl.o: $(LISP_H) sysfile.h -hpplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h -imgproc.o: $(LISP_H) imgproc.h -indent.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h faces.h frame.h glyphs.h insdel.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -inline.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap.h lstream.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h syntax.h sysdll.h sysfile.h systime.h syswindows.h toolbar.h tooltalk.h ui-gtk.h window-impl.h window.h winslots.h xintrinsic.h -input-method-motif.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h frame-impl.h frame.h frameslots.h redisplay.h specifier.h xintrinsic.h xmotif.h -input-method-xlib.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h xintrinsic.h -insdel.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h console.h device.h extents.h frame.h insdel.h line-number.h lstream.h redisplay.h -intl-auto-encap-win32.o: $(LISP_H) intl-auto-encap-win32.h syswindows.h -intl-encap-win32.o: $(LISP_H) console-msw.h console.h intl-auto-encap-win32.h syswindows.h -intl-win32.o: $(LISP_H) charset.h coding-system-slots.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h intl-auto-encap-win32.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h syswindows.h window-impl.h window.h winslots.h -intl.o: $(LISP_H) -keymap.o: $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h events.h extents.h frame.h insdel.h keymap.h redisplay.h scrollbar.h specifier.h systime.h window.h +editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h text.h vdb.h window.h +elhash.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h +emacs.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console-msw.h console.h dump-data.h dumper.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h paths.h process.h redisplay.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h +emodules.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h emodules.h file-coding.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdll.h text.h vdb.h window.h +esd.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h +eval.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window.h +event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h offix-types.h offix.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h +event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h macros.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h +event-unixoid.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h +events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h extents.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h debug.h device.h dumper.h elhash.h extents-impl.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h gutter.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +faces.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +file-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h +fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +filelock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h paths.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h text.h vdb.h +filemode.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +floatfns.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h +fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h events.h extents.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h redisplay.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h +font-lock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h +font-mgr.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h font-mgr.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h +frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +free-hook.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h text.h vdb.h window-impl.h window.h winslots.h +general.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +getloadavg.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syssignal.h text.h vdb.h +gif_io.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +glyphs-eimage.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame.h gc.h general-slots.h gifrlib.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h +glyphs-shared.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h imgproc.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h +glyphs-widget.o: $(CONFIG_H) $(LISP_H) bytecode.h charset.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +glyphs.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h text.h vdb.h window-impl.h window.h winslots.h +gmalloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h text.h vdb.h +gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h gpmevent.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h +gui.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h +gutter.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +hash.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +hftctl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +hpplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h text.h vdb.h +imgproc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h imgproc.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +indent.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdll.h sysfile.h systime.h syswindows.h text.h toolbar.h tooltalk.h ui-gtk.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +input-method-motif.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h xmotif.h +input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +insdel.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h +intl-auto-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h +intl-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h +intl-win32.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h +intl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h events.h extents.h frame.h gc.h general-slots.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h lastfile.o: $(CONFIG_H) -libinterface.o: $(LISP_H) gifrlib.h libinterface.h -libsst.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h libsst.h sound.h sysfile.h -line-number.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h line-number.h -linuxplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h syssignal.h systty.h -lread.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h intl-auto-encap-win32.h lstream.h opaque.h profile.h sysfile.h sysfloat.h syswindows.h -lstream.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h lstream.h sysfile.h -macros.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device.h events.h frame.h keymap.h macros.h redisplay.h scrollbar.h specifier.h systime.h window.h +libinterface.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h gifrlib.h libinterface.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +libsst.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h libsst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h text.h vdb.h +line-number.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +linuxplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h systty.h text.h vdb.h +lread.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h symeval.h symsinit.h sysfile.h sysfloat.h syswindows.h text.h vdb.h +lstream.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h macros.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h malloc.o: $(CONFIG_H) getpagesize.h syssignal.h -marker.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h -mc-alloc.o: $(LISP_H) blocktype.h getpagesize.h -md5.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h -menubar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h gui.h keymap.h menubar.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -minibuf.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console-stream.h console.h events.h frame-impl.h frame.h frameslots.h insdel.h redisplay.h scrollbar.h specifier.h systime.h window-impl.h window.h winslots.h -miscplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h miscplay.h sound.h sysfile.h syssignal.h -nas.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysdep.h syssignal.h -nt.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h ndir.h process.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h -ntheap.o: $(LISP_H) intl-auto-encap-win32.h sysdep.h syswindows.h -ntplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h intl-auto-encap-win32.h sound.h sysfile.h syswindows.h -number-gmp.o: $(LISP_H) sysproc.h syssignal.h systime.h -number-mp.o: $(LISP_H) -number.o: $(LISP_H) -objects.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame.h glyphs.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h systty.h window-impl.h window.h winslots.h +marker.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +mc-alloc.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +md5.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-stream.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h +miscplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h text.h vdb.h +nas.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h syssignal.h text.h vdb.h +nt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h +ntheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h syswindows.h text.h vdb.h +ntplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h +number-gmp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysproc.h syssignal.h systime.h text.h vdb.h +number-mp.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +number.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +objects.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h window-impl.h window.h winslots.h offix.o: offix-cursors.h offix-types.h offix.h xintrinsic.h -opaque.o: $(LISP_H) opaque.h -print.o: $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h extents.h frame.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h redisplay.h specifier.h sysfile.h systty.h syswindows.h -process-nt.o: $(LISP_H) console-msw.h console.h events.h hash.h intl-auto-encap-win32.h lstream.h process-slots.h process.h procimpl.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h -process-unix.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h console.h events.h file-coding.h frame.h hash.h lstream.h ndir.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h window.h -process.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h console.h device.h events.h file-coding.h frame.h hash.h insdel.h intl-auto-encap-win32.h lstream.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h -profile.o: $(LISP_H) backtrace.h bytecode.h elhash.h hash.h profile.h syssignal.h systime.h -ralloc.o: $(LISP_H) getpagesize.h -rangetab.o: $(LISP_H) rangetab.h -realpath.o: $(LISP_H) backtrace.h intl-auto-encap-win32.h ndir.h profile.h sysdir.h sysfile.h syswindows.h -redisplay-output.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -redisplay.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h glyphs.h gui.h gutter.h insdel.h line-number.h menubar.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h sysfile.h systime.h systty.h toolbar.h window-impl.h window.h winslots.h -regex.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h regex.h syntax.h -scrollbar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h -search.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h insdel.h opaque.h regex.h syntax.h -select.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h extents.h frame.h objects.h opaque.h redisplay.h select.h specifier.h -sgiplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h libst.h sound.h sysfile.h sysproc.h syssignal.h systime.h -sheap.o: $(LISP_H) sheap-adjust.h sysfile.h -signal.o: $(LISP_H) conslots.h console-impl.h console.h device-impl.h device.h devslots.h events.h frame-impl.h frame.h frameslots.h process.h redisplay.h specifier.h sysdep.h sysfile.h syssignal.h systime.h -sound.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h intl-auto-encap-win32.h redisplay.h sound.h specifier.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h xintrinsic.h -specifier.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame.h glyphs.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +opaque.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h +print.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h systty.h syswindows.h text.h vdb.h +process-nt.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h events.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process-slots.h process.h procimpl.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h +process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h window.h +process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h +profile.o: $(CONFIG_H) $(LISP_H) backtrace.h bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h syssignal.h systime.h text.h vdb.h +ralloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +rangetab.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h rangetab.h symeval.h symsinit.h text.h vdb.h +realpath.o: $(CONFIG_H) $(LISP_H) backtrace.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysdir.h sysfile.h syswindows.h text.h vdb.h +redisplay-output.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +regex.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h +scrollbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h +search.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h +select.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h text.h vdb.h +sgiplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h libst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h text.h vdb.h +sheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sheap-adjust.h symeval.h symsinit.h sysfile.h text.h vdb.h +signal.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h text.h vdb.h +sound.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h sound.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h xintrinsic.h +specifier.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h strcat.o: $(CONFIG_H) strcmp.o: $(CONFIG_H) strcpy.o: $(CONFIG_H) -strftime.o: $(LISP_H) -sunplay.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h sound.h sysdep.h sysfile.h syssignal.h -sunpro.o: $(LISP_H) -symbols.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h elhash.h specifier.h -syntax.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h syntax.h -sysdep.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h events.h frame.h intl-auto-encap-win32.h ndir.h process.h redisplay.h scrollbar.h specifier.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h window.h -sysdll.o: $(LISP_H) intl-auto-encap-win32.h sysdll.h sysfile.h syswindows.h -termcap.o: $(LISP_H) console.h device.h +strftime.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +sunplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h text.h vdb.h +sunpro.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +symbols.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h +syntax.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h +sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h +sysdll.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdll.h sysfile.h syswindows.h text.h vdb.h +termcap.o: $(CONFIG_H) $(LISP_H) compiler.h console.h device.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h terminfo.o: $(CONFIG_H) -tests.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h elhash.h file-coding.h lstream.h opaque.h -text.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h file-coding.h lstream.h profile.h -toolbar-common.o: $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h faces.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h toolbar-common.h toolbar.h window-impl.h window.h winslots.h xintrinsic.h -toolbar.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h frame-impl.h frame.h frameslots.h glyphs.h redisplay.h scrollbar.h specifier.h toolbar.h window-impl.h window.h winslots.h -tooltalk.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h elhash.h process.h syssignal.h tooltalk.h -tparam.o: $(LISP_H) -undo.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h extents.h -unexaix.o: $(LISP_H) getpagesize.h +tests.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h +text.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h text.h vdb.h +toolbar-common.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h +toolbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h +tooltalk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h syssignal.h text.h tooltalk.h vdb.h +tparam.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +undo.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +unexaix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h unexalpha.o: $(CONFIG_H) compiler.h unexapollo.o: $(CONFIG_H) unexconvex.o: $(CONFIG_H) compiler.h getpagesize.h -unexcw.o: $(LISP_H) sysfile.h -unexec.o: $(LISP_H) getpagesize.h -unexelf.o: $(LISP_H) +unexcw.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h text.h vdb.h +unexec.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +unexelf.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h unexelfsgi.o: $(CONFIG_H) compiler.h unexencap.o: compiler.h unexenix.o: $(CONFIG_H) compiler.h unexfreebsd.o: $(CONFIG_H) compiler.h unexfx2800.o: compiler.h unexhp9k3.o: $(CONFIG_H) compiler.h sysdep.h syssignal.h -unexhp9k800.o: $(LISP_H) +unexhp9k800.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h unexmips.o: $(CONFIG_H) compiler.h getpagesize.h -unexnt.o: $(LISP_H) intl-auto-encap-win32.h sysfile.h syswindows.h +unexnt.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h unexsni.o: compiler.h unexsol2-6.o: compiler.h unexsol2.o: compiler.h unexsunos4.o: $(CONFIG_H) compiler.h -unicode.o: $(LISP_H) charset.h coding-system-slots.h file-coding.h opaque.h sysfile.h -vdb-fake.o: $(LISP_H) -vdb-mach.o: $(LISP_H) -vdb-posix.o: $(LISP_H) -vdb-win32.o: $(LISP_H) intl-auto-encap-win32.h syswindows.h -vdb.o: $(LISP_H) -vm-limit.o: $(LISP_H) mem-limits.h -widget.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h -win32.o: $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h console-msw.h console.h hash.h intl-auto-encap-win32.h profile.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h -window.o: $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h elhash.h faces.h frame-impl.h frame.h frameslots.h glyphs.h gutter.h objects.h redisplay.h scrollbar.h specifier.h window-impl.h window.h winslots.h +unicode.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h sysfile.h text.h vdb.h +vdb-fake.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +vdb-mach.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +vdb-posix.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +vdb-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h +vdb.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +vm-limit.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mem-limits.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +widget.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h +win32.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h +window.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h xmu.o: $(CONFIG_H) diff -r 71bf2c5667ba -r 66411359ce4e src/device-gtk.c --- a/src/device-gtk.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/device-gtk.c Sat Oct 25 21:40:46 2008 +0900 @@ -56,8 +56,8 @@ #include #endif -/* Qdisplay in general.c */ -Lisp_Object Qinit_pre_gtk_win, Qinit_post_gtk_win; +Lisp_Object Qmake_device_early_gtk_entry_point, + Qmake_device_late_gtk_entry_point; /* The application class of Emacs. */ Lisp_Object Vgtk_emacs_application_class; @@ -220,6 +220,9 @@ GdkVisual *visual = NULL; GdkColormap *cmap = NULL; + /* Run the early elisp side of the GTK device initialization. */ + call0 (Qmake_device_early_gtk_entry_point); + /* gtk_init() and even gtk_check_init() are so brain dead that getting an empty argv array causes them to abort. */ if (NILP (Vgtk_initial_argv_list)) @@ -267,13 +270,6 @@ gdk_set_use_xshm (FALSE); #endif - /* We attempt to load this file so that the user can set - ** gtk-initial-geometry and not need GNOME & session management to - ** set their default frame size. It also avoids the flicker - ** associated with setting the frame size in your .emacs file. - */ - call4 (Qload, build_string ("~/.xemacs/gtk-options.el"), Qt, Qt, Qt); - #ifdef HAVE_GDK_IMLIB_INIT /* Some themes in Gtk are so lame (most notably the Pixmap theme) that they rely on gdk_imlib, but don't call its initialization @@ -336,15 +332,12 @@ DEVICE_GTK_GRAY_PIXMAP (d) = NULL; gtk_init_device_class (d); - - /* Run the elisp side of the X device initialization. */ - call0 (Qinit_pre_gtk_win); } static void -gtk_finish_init_device (struct device *UNUSED (d), Lisp_Object UNUSED (props)) +gtk_finish_init_device (struct device *d, Lisp_Object UNUSED (props)) { - call0 (Qinit_post_gtk_win); + call1 (Qmake_device_late_gtk_entry_point, wrap_device(d)); } static void @@ -359,15 +352,13 @@ /* closing an X connection */ /************************************************************************/ +#ifndef NEW_GC static void free_gtk_device_struct (struct device *d) { -#ifdef NEW_GC - mc_free (d->device_data); -#else /* not NEW_GC */ xfree (d->device_data, void *); +} #endif /* not NEW_GC */ -} static void gtk_delete_device (struct device *d) @@ -711,8 +702,8 @@ DEFSUBR (Fgtk_ungrab_keyboard); DEFSUBR (Fgtk_init); - DEFSYMBOL (Qinit_pre_gtk_win); - DEFSYMBOL (Qinit_post_gtk_win); + DEFSYMBOL (Qmake_device_early_gtk_entry_point); + DEFSYMBOL (Qmake_device_late_gtk_entry_point); } void diff -r 71bf2c5667ba -r 66411359ce4e src/device-msw.c --- a/src/device-msw.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/device-msw.c Sat Oct 25 21:40:46 2008 +0900 @@ -60,7 +60,8 @@ HSZ mswindows_dde_item_open; #endif -Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win; +Lisp_Object Qmake_device_early_mswindows_entry_point, + Qmake_device_late_mswindows_entry_point; Lisp_Object Qdevmodep; static Lisp_Object Q_allow_selection; @@ -157,6 +158,8 @@ HDC hdc; WNDCLASSEXW wc; + call0 (Qmake_device_early_mswindows_entry_point); + DEVICE_CLASS (d) = Qcolor; DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1; init_baud_rate (d); @@ -273,13 +276,14 @@ } static void -mswindows_finish_init_device (struct device *UNUSED (d), +mswindows_finish_init_device (struct device *d, Lisp_Object UNUSED (props)) { #ifdef HAVE_DRAGNDROP /* Tell pending clients we are ready. */ mswindows_dde_enable = 1; #endif + call1 (Qmake_device_late_mswindows_entry_point, wrap_device(d)); } static void @@ -300,9 +304,7 @@ #endif DeleteDC (DEVICE_MSWINDOWS_HCDC (d)); -#ifdef NEW_GC - mc_free (d->device_data); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (d->device_data, void *); #endif /* not NEW_GC */ } @@ -576,9 +578,7 @@ DEVICE_MSPRINTER_DEVMODE (d) = Qnil; } -#ifdef NEW_GC - mc_free (d->device_data); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (d->device_data, void *); #endif /* not NEW_GC */ } @@ -1397,8 +1397,8 @@ DEFKEYWORD (Q_selected_page_button); DEFSYMBOL (Qselected_page_button); - DEFSYMBOL (Qinit_pre_mswindows_win); - DEFSYMBOL (Qinit_post_mswindows_win); + DEFSYMBOL (Qmake_device_early_mswindows_entry_point); + DEFSYMBOL ( Qmake_device_late_mswindows_entry_point); } void diff -r 71bf2c5667ba -r 66411359ce4e src/device-tty.c --- a/src/device-tty.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/device-tty.c Sat Oct 25 21:40:46 2008 +0900 @@ -41,7 +41,7 @@ #include "sysfile.h" #include "syssignal.h" /* for SIGWINCH */ -Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win; +Lisp_Object Qmake_device_early_tty_entry_point; #ifdef NEW_GC @@ -72,6 +72,10 @@ struct console *con = XCONSOLE (DEVICE_CONSOLE (d)); Lisp_Object terminal_type = CONSOLE_TTY_DATA (con)->terminal_type; + /* Run part of the elisp side of the TTY device initialization. + The post-init is run in the tty_finish_init_device() method. */ + call0 (Qmake_device_early_tty_entry_point); + DEVICE_INFD (d) = CONSOLE_TTY_DATA (con)->infd; DEVICE_OUTFD (d) = CONSOLE_TTY_DATA (con)->outfd; @@ -107,10 +111,6 @@ } init_one_device (d); - - /* Run part of the elisp side of the TTY device initialization. - The post-init is run in the tty_after_init_frame() method. */ - call0 (Qinit_pre_tty_win); } #ifndef NEW_GC @@ -211,8 +211,7 @@ INIT_LRECORD_IMPLEMENTATION (tty_device); #endif /* NEW_GC */ - DEFSYMBOL (Qinit_pre_tty_win); - DEFSYMBOL (Qinit_post_tty_win); + DEFSYMBOL (Qmake_device_early_tty_entry_point); } void diff -r 71bf2c5667ba -r 66411359ce4e src/device-x.c --- a/src/device-x.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/device-x.c Sat Oct 25 21:40:46 2008 +0900 @@ -65,14 +65,14 @@ #include "offix.h" #endif +Lisp_Object Vx_app_defaults_directory; #ifdef MULE -Lisp_Object Vx_app_defaults_directory; Lisp_Object Qget_coding_system_from_locale; #endif /* Qdisplay in general.c */ Lisp_Object Qx_error; -Lisp_Object Qinit_pre_x_win, Qinit_post_x_win; +Lisp_Object Qmake_device_early_x_entry_point, Qmake_device_late_x_entry_point; /* The application class of Emacs. */ Lisp_Object Vx_emacs_application_class; @@ -542,6 +542,10 @@ /* */ int best_visual_found = 0; + /* Run the elisp side of the X device initialization, allowing it to set + x-emacs-application-class and x-app-defaults-directory. */ + call0 (Qmake_device_early_x_entry_point); + #if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D) /* * In order to avoid the lossage with flat Athena widgets dynamically @@ -703,6 +707,10 @@ path = alloca_extbytes (strlen (data_dir) + 13 + strlen (locale) + 7); format = "%sapp-defaults/%s/Emacs"; } + else + { + goto no_data_directory; + } /* * The general form for $LANG is _.. Try @@ -730,6 +738,7 @@ XrmCombineFileDatabase (path, &db, False); } + no_data_directory: xfree (locale, Extbyte*); } #endif /* MULE */ @@ -916,15 +925,12 @@ Xatoms_of_select_x (d); Xatoms_of_objects_x (d); x_init_device_class (d); - - /* Run the elisp side of the X device initialization. */ - call0 (Qinit_pre_x_win); } static void -x_finish_init_device (struct device *UNUSED (d), Lisp_Object UNUSED (props)) +x_finish_init_device (struct device *d, Lisp_Object UNUSED (props)) { - call0 (Qinit_post_x_win); + call1 (Qmake_device_late_x_entry_point, wrap_device (d)); } static void @@ -939,15 +945,13 @@ /* closing an X connection */ /************************************************************************/ +#ifndef NEW_GC static void free_x_device_struct (struct device *d) { -#ifdef NEW_GC - mc_free (d->device_data); -#else /* not NEW_GC */ xfree (d->device_data, void *); +} #endif /* not NEW_GC */ -} static void x_delete_device (struct device *d) @@ -990,7 +994,9 @@ #endif } +#ifndef NEW_GC free_x_device_struct (d); +#endif /* not NEW_GC */ } @@ -2128,8 +2134,8 @@ DEFSUBR (Fx_set_font_path); DEFSYMBOL (Qx_error); - DEFSYMBOL (Qinit_pre_x_win); - DEFSYMBOL (Qinit_post_x_win); + DEFSYMBOL (Qmake_device_early_x_entry_point); + DEFSYMBOL (Qmake_device_late_x_entry_point); #ifdef MULE DEFSYMBOL (Qget_coding_system_from_locale); @@ -2202,13 +2208,11 @@ */ ); Vx_initial_argv_list = Qnil; -#ifdef MULE DEFVAR_LISP ("x-app-defaults-directory", &Vx_app_defaults_directory /* Used by the Lisp code to communicate to the low level X initialization where the localized init files are. */ ); Vx_app_defaults_directory = Qnil; -#endif Fprovide (Qx); } diff -r 71bf2c5667ba -r 66411359ce4e src/dired.c --- a/src/dired.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/dired.c Sat Oct 25 21:40:46 2008 +0900 @@ -824,7 +824,7 @@ First integer has high-order 16 bits of time, second has low 16 bits. 5. Last modification time, likewise. 6. Last status change time, likewise. - 7. Size in bytes. (-1, if number is out of range). + 7. Size in bytes. (-1, if number out of range and no bignum support.) 8. File modes, as a string of ten letters or dashes as in ls -l. 9. t iff file's gid would change if file were deleted and recreated. 10. inode number. @@ -900,11 +900,14 @@ values[4] = make_time (s.st_atime); values[5] = make_time (s.st_mtime); values[6] = make_time (s.st_ctime); - values[7] = make_int ((EMACS_INT) s.st_size); - /* If the size is out of range, give back -1. */ - /* #### Fix when Emacs gets bignums! */ - if (XINT (values[7]) != s.st_size) - values[7] = make_int (-1); + +#ifndef HAVE_BIGNUM + values[7] = make_integer (NUMBER_FITS_IN_AN_EMACS_INT (s.st_size) ? + (EMACS_INT)s.st_size : -1); +#else + values[7] = make_integer (s.st_size); +#endif + filemodestring (&s, modes); values[8] = make_string ((Ibyte *) modes, 10); #if defined (BSD4_2) || defined (BSD4_3) /* file gid will be dir gid */ diff -r 71bf2c5667ba -r 66411359ce4e src/doc.c --- a/src/doc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/doc.c Sat Oct 25 21:40:46 2008 +0900 @@ -37,7 +37,7 @@ Lisp_Object Vinternal_doc_file_name; -Lisp_Object QSsubstitute; +Lisp_Object QSsubstitute, Qdefvar; /* Work out what source file a function or variable came from, taking the information from the documentation file. */ @@ -499,21 +499,27 @@ weirdness, type, XSTRING_DATA (XSYMBOL (sym)->name), pos); } -DEFUN ("built-in-symbol-file", Fbuilt_in_symbol_file, 1, 1, 0, /* +DEFUN ("built-in-symbol-file", Fbuilt_in_symbol_file, 1, 2, 0, /* Return the C source file built-in symbol SYM comes from. Don't use this. Use the more general `symbol-file' (q.v.) instead. + +If TYPE is nil or omitted, any kind of definition is acceptable. +If TYPE is `defun', then function, subr, special form or macro definitions +are acceptable. +If TYPE is `defvar', then variable definitions are acceptable. */ - (symbol)) + (symbol, type)) { /* This function can GC */ Lisp_Object fun; Lisp_Object filename = Qnil; - if (EQ(Ffboundp(symbol), Qt)) + if (EQ(Ffboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefun))) { fun = Findirect_function (symbol); - if (SUBRP (fun)) + if (SUBRP (fun) || (CONSP(fun) && (EQ (Qmacro, Fcar_safe (fun))) + && (fun = Fcdr_safe (fun), SUBRP (fun)))) { if (XSUBR (fun)->doc == 0) return Qnil; @@ -529,7 +535,7 @@ (make_int (- (EMACS_INT) XSUBR (fun)->doc)); } } - else if (EQ(Fboundp(symbol), Qt)) + else if (EQ(Fboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefvar))) { Lisp_Object doc_offset = Fget (symbol, Qvariable_documentation, Qnil); @@ -1273,6 +1279,8 @@ DEFSUBR (Fsnarf_documentation); DEFSUBR (Fverify_documentation); DEFSUBR (Fsubstitute_command_keys); + + DEFSYMBOL (Qdefvar); } void diff -r 71bf2c5667ba -r 66411359ce4e src/doprnt.c --- a/src/doprnt.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/doprnt.c Sat Oct 25 21:40:46 2008 +0900 @@ -34,7 +34,7 @@ #include "lstream.h" static const char * const valid_flags = "-+ #0"; -static const char * const valid_converters = "dic" "ouxX" "feEgG" "sS" +static const char * const valid_converters = "dic" "ouxX" "feEgG" "sS" "b" #if defined(HAVE_BIGNUM) || defined(HAVE_RATIO) "npyY" #endif @@ -43,11 +43,11 @@ #endif ; static const char * const int_converters = "dic"; -static const char * const unsigned_int_converters = "ouxX"; +static const char * const unsigned_int_converters = "ouxXb"; static const char * const double_converters = "feEgG"; static const char * const string_converters = "sS"; #if defined(HAVE_BIGNUM) || defined(HAVE_RATIO) -static const char * const bignum_converters = "npyY"; +static const char * const bignum_converters = "npyY\337"; #endif #ifdef HAVE_BIGFLOAT static const char * const bigfloat_converters = "FhHkK"; @@ -558,7 +558,7 @@ { /* For `S', prin1 the argument and then treat like a string. */ - ls = Fprin1_to_string (obj, Qnil); + ls = prin1_to_string (obj, 0); } else if (STRINGP (obj)) ls = obj; @@ -567,7 +567,7 @@ else { /* convert to string using princ. */ - ls = Fprin1_to_string (obj, Qt); + ls = prin1_to_string (obj, 1); } string = XSTRING_DATA (ls); string_len = XSTRING_LENGTH (ls); @@ -665,6 +665,7 @@ case 'o': ch = 'p'; break; case 'x': ch = 'y'; break; case 'X': ch = 'Y'; break; + case 'b': ch = '\337'; break; default: /* ch == 'u' */ if (strchr (unsigned_int_converters, ch) && ratio_sign (XRATIO_DATA (obj)) < 0) @@ -684,6 +685,7 @@ case 'o': ch = 'p'; break; case 'x': ch = 'y'; break; case 'X': ch = 'Y'; break; + case 'b': ch = '\337'; break; default: /* ch == 'u' */ if (strchr (unsigned_int_converters, ch) && bignum_sign (XBIGNUM_DATA (obj)) < 0) @@ -733,13 +735,21 @@ #if defined(HAVE_BIGNUM) || defined(HAVE_RATIO) else if (strchr (bignum_converters, ch)) { + int base = 16; + + if (ch == 'n') + base = 10; + else if (ch == 'p') + base = 8; + else if (ch == '\337') + base = 2; + #ifdef HAVE_BIGNUM if (BIGNUMP (arg.obj)) { Ibyte *text_to_print = (Ibyte *) bignum_to_string (XBIGNUM_DATA (arg.obj), - ch == 'n' ? 10 : - (ch == 'p' ? 8 : 16)); + base); doprnt_2 (stream, text_to_print, strlen ((const char *) text_to_print), spec->minwidth, -1, spec->minus_flag, @@ -751,9 +761,7 @@ if (RATIOP (arg.obj)) { Ibyte *text_to_print = - (Ibyte *) ratio_to_string (XRATIO_DATA (arg.obj), - ch == 'n' ? 10 : - (ch == 'p' ? 8 : 16)); + (Ibyte *) ratio_to_string (XRATIO_DATA (arg.obj), base); doprnt_2 (stream, text_to_print, strlen ((const char *) text_to_print), spec->minwidth, -1, spec->minus_flag, @@ -774,11 +782,32 @@ xfree (text_to_print, Ibyte *); } #endif /* HAVE_BIGFLOAT */ + else if (ch == 'b') + { + Ascbyte *text_to_print = alloca_array (char, SIZEOF_LONG * 8 + 1); + + ulong_to_bit_string (text_to_print, arg.ul); + doprnt_2 (stream, (Ibyte *)text_to_print, + qxestrlen ((Ibyte *)text_to_print), + spec->minwidth, -1, spec->minus_flag, spec->zero_flag); + } else { - Ascbyte *text_to_print = alloca_array (char, 350); + Ascbyte *text_to_print; Ascbyte constructed_spec[100]; Ascbyte *p = constructed_spec; + int alloca_sz = 350; + int min = spec->minwidth, prec = spec->precision; + + if (prec < 0) + prec = 0; + if (min < 0) + min = 0; + + if (32+min+prec > alloca_sz) + alloca_sz = 32 + min + prec; + + text_to_print = alloca_array(char, alloca_sz); /* Mostly reconstruct the spec and use sprintf() to format the string. */ diff -r 71bf2c5667ba -r 66411359ce4e src/dumper.c --- a/src/dumper.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/dumper.c Sat Oct 25 21:40:46 2008 +0900 @@ -2630,6 +2630,8 @@ return 0; } +#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */ + int pdump_load (const Wexttext *argv0) { @@ -2637,7 +2639,6 @@ Wexttext *exe_path = NULL; int bufsize = 4096; int cchpathsize; -#define DUMP_SLACK 100 /* Enough to include dump ID, version name, .DMP */ /* Copied from mswindows_get_module_file_name (). Not clear if it's kosher to malloc() yet. */ @@ -2693,18 +2694,18 @@ if (p != dir) { /* invocation-name includes a directory component -- presumably it - is relative to cwd, not $PATH */ - exe_path = alloca_array (Wexttext, 1 + wext_strlen (dir)); + is relative to cwd, not $PATH. */ + exe_path = alloca_array (Wexttext, 1 + wext_strlen (dir) + DUMP_SLACK); wext_strcpy (exe_path, dir); } else { const Wexttext *path = wext_getenv ("PATH"); /* not egetenv -- - not yet init. */ + not yet init. */ const Wexttext *name = p; exe_path = alloca_array (Wexttext, - 10 + max (wext_strlen (name), - wext_strlen (path))); + 1 + DUMP_SLACK + max (wext_strlen (name), + wext_strlen (path))); for (;;) { p = path; diff -r 71bf2c5667ba -r 66411359ce4e src/dynarr.c --- a/src/dynarr.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/dynarr.c Sat Oct 25 21:40:46 2008 +0900 @@ -162,13 +162,10 @@ Dynarr_lisp_realloc (Dynarr *dy, int new_size) { void *new_base = alloc_lrecord_array (dy->elsize, new_size, dy->lisp_imp); - void *old_base = dy->base; if (dy->base) memcpy (new_base, dy->base, (dy->max < new_size ? dy->max : new_size) * dy->elsize); dy->base = new_base; - if (old_base) - mc_free (old_base); } void * @@ -266,16 +263,12 @@ #ifdef NEW_GC if (dy->base && !DUMPEDP (dy->base)) { - if (dy->lisp_imp) - mc_free (dy->base); - else + if (!dy->lisp_imp) xfree (dy->base, void *); } if(!DUMPEDP (dy)) { - if (dy->lisp_imp) - mc_free (dy); - else + if (!dy->lisp_imp) xfree (dy, Dynarr *); } #else /* not NEW_GC */ diff -r 71bf2c5667ba -r 66411359ce4e src/editfns.c --- a/src/editfns.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/editfns.c Sat Oct 25 21:40:46 2008 +0900 @@ -1015,6 +1015,8 @@ %d is replaced by the day of month, zero-padded. %D is a synonym for "%m/%d/%y". %e is replaced by the day of month, blank-padded. +%G is replaced by the year containing the ISO 8601 week +%g is replaced by the year of the ISO 8601 week within the century (00-99) %h is a synonym for "%b". %H is replaced by the hour (00-23). %I is replaced by the hour (00-12). @@ -1033,12 +1035,14 @@ %t is a synonym for "\\t". %T is a synonym for "%H:%M:%S". %U is replaced by the week of the year (00-53), first day of week is Sunday. +%V is replaced by the ISO 8601 week number %w is replaced by the day of week (0-6), Sunday is day 0. %W is replaced by the week of the year (00-53), first day of week is Monday. %x is a locale-specific synonym, which defaults to "%D" in the C locale. %X is a locale-specific synonym, which defaults to "%T" in the C locale. %y is replaced by the year without century (00-99). %Y is replaced by the year with century. +%z is replaced by the time zone as a numeric offset (e.g +0530, -0800 etc.) %Z is replaced by the time zone abbreviation. The number of options reflects the `strftime' function. @@ -1063,13 +1067,15 @@ { Extbyte *buf = alloca_extbytes (size); Extbyte *formext; + /* make a copy of the static buffer returned by localtime() */ + struct tm tm = * localtime(&value); + *buf = 1; /* !!#### this use of external here is not totally safe, and potentially data lossy. */ LISP_STRING_TO_EXTERNAL (format_string, formext, Qnative); - if (emacs_strftime (buf, size, formext, - localtime (&value)) + if (emacs_strftime (buf, size, formext, &tm) || !*buf) return build_ext_string (buf, Qnative); /* If buffer was too small, make it bigger. */ @@ -1818,8 +1824,12 @@ nil (nil meaning don't replace.) If TABLE is a char-table, its elements describe the mapping between -characters and their replacements. The char-table should be of type -`char' or `generic'. +characters and their replacements. The char-table should be of type `char' +or `generic'. If the value given by `get-char-table' for a given character +is nil, that character will not be translated by `translate-region'. Since +`get-char-table' can never return nil with a char table of type `char', and +since most translation involves a subset of the possible XEmacs characters, +not all of them, the most generally useful table type here is `generic'. Returns the number of substitutions performed. */ @@ -2149,7 +2159,7 @@ %s means print all objects as-is, using `princ'. %S means print all objects as s-expressions, using `prin1'. %d or %i means print as an integer in decimal (%o octal, %x lowercase hex, - %X uppercase hex). + %X uppercase hex, %b binary). %c means print as a single character. %f means print as a floating-point number in fixed notation (e.g. 785.200). %e or %E means print as a floating-point number in scientific notation @@ -2535,8 +2545,8 @@ DEFVAR_LISP ("user-full-name", &Vuser_full_name /* *The name of the user. -The function `user-full-name', which will return the value of this - variable, when called without arguments. +The function `user-full-name' will return the value of this variable, when +called without arguments. This is initialized to the value of the NAME environment variable. */ ); /* Initialized at run-time. */ diff -r 71bf2c5667ba -r 66411359ce4e src/elhash.c --- a/src/elhash.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/elhash.c Sat Oct 25 21:40:46 2008 +0900 @@ -94,15 +94,6 @@ static Lisp_Object Qweak, Qkey_weak, Qvalue_weak, Qkey_or_value_weak; static Lisp_Object Qnon_weak, Q_type; -typedef struct htentry -{ -#ifdef NEW_GC - struct lrecord_header lheader; -#endif /* NEW_GC */ - Lisp_Object key; - Lisp_Object value; -} htentry; - struct Lisp_Hash_Table { struct LCRECORD_HEADER header; @@ -120,7 +111,6 @@ hash tables. Don't mark through this. */ }; -#define HTENTRY_CLEAR_P(htentry) ((*(EMACS_UINT*)(&((htentry)->key))) == 0) #define CLEAR_HTENTRY(htentry) \ ((*(EMACS_UINT*)(&((htentry)->key))) = 0, \ (*(EMACS_UINT*)(&((htentry)->value))) = 0) @@ -408,28 +398,16 @@ write_fmt_string (printcharfun, " 0x%x>", ht->header.uid); } +#ifndef NEW_GC static void -free_hentries ( -#if defined (NEW_GC) && !defined (ERROR_CHECK_STRUCTURES) - htentry *UNUSED (hentries), -#else - htentry *hentries, -#endif +free_hentries (htentry *hentries, #ifdef ERROR_CHECK_STRUCTURES size_t size -#else /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */ +#else /* not ERROR_CHECK_STRUCTURES) */ size_t UNUSED (size) -#endif /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */ +#endif /* not ERROR_CHECK_STRUCTURES) */ ) { -#ifdef NEW_GC -#ifdef ERROR_CHECK_STRUCTURES - htentry *e, *sentinel; - - for (e = hentries, sentinel = e + size; e < sentinel; e++) - mc_free (e); -#endif -#else /* not NEW_GC */ #ifdef ERROR_CHECK_STRUCTURES /* Ensure a crash if other code uses the discarded entries afterwards. */ htentry *e, *sentinel; @@ -440,10 +418,8 @@ if (!DUMPEDP (hentries)) xfree (hentries, htentry *); -#endif /* not NEW_GC */ } -#ifndef NEW_GC static void finalize_hash_table (void *header, int for_disksave) { @@ -1081,7 +1057,9 @@ *probe = *e; } +#ifndef NEW_GC free_hentries (old_entries, old_size); +#endif /* not NEW_GC */ } /* After a hash table has been saved to disk and later restored by the @@ -1111,9 +1089,7 @@ memcpy (ht->hentries, new_entries, ht->size * sizeof (htentry)); -#ifdef NEW_GC - mc_free (new_entries); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (new_entries, htentry *); #endif /* not NEW_GC */ } @@ -1126,7 +1102,7 @@ resize_hash_table (ht, new_size); } -static htentry * +htentry * find_htentry (Lisp_Object key, const Lisp_Hash_Table *ht) { hash_table_test_function_t test_function = ht->test_function; @@ -1182,7 +1158,7 @@ } DEFUN ("puthash", Fputhash, 3, 3, 0, /* -Hash KEY to VALUE in HASH-TABLE. +Hash KEY to VALUE in HASH-TABLE, and return VALUE. */ (key, value, hash_table)) { @@ -1246,6 +1222,7 @@ DEFUN ("clrhash", Fclrhash, 1, 1, 0, /* Remove all entries from HASH-TABLE, leaving it empty. +Return HASH-TABLE. */ (hash_table)) { @@ -1743,12 +1720,33 @@ { if (depth > 5) return 0; - if (CONSP (obj)) + + if (CONSP(obj)) { - /* no point in worrying about tail recursion, since we're not - going very deep */ - return HASH2 (internal_hash (XCAR (obj), depth + 1), - internal_hash (XCDR (obj), depth + 1)); + Hashcode hash, h; + int s; + + depth += 1; + + if (!CONSP(XCDR(obj))) + { + /* special case for '(a . b) conses */ + return HASH2(internal_hash(XCAR(obj), depth), + internal_hash(XCDR(obj), depth)); + } + + /* Don't simply tail recurse; we want to hash lists with the + same contents in distinct orders differently. */ + hash = internal_hash(XCAR(obj), depth); + + obj = XCDR(obj); + for (s = 1; s < 6 && CONSP(obj); obj = XCDR(obj), s++) + { + h = internal_hash(XCAR(obj), depth); + hash = HASH3(hash, h, s); + } + + return hash; } if (STRINGP (obj)) { diff -r 71bf2c5667ba -r 66411359ce4e src/elhash.h --- a/src/elhash.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/elhash.h Sat Oct 25 21:40:46 2008 +0900 @@ -33,7 +33,19 @@ #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table) #define CONCHECK_HASH_TABLE(x) CONCHECK_RECORD (x, hash_table) +typedef struct htentry +{ #ifdef NEW_GC + struct lrecord_header lheader; +#endif /* NEW_GC */ + Lisp_Object key; + Lisp_Object value; +} htentry; + +#define HTENTRY_CLEAR_P(htentry) ((*(EMACS_UINT*)(&((htentry)->key))) == 0) + +#ifdef NEW_GC + typedef struct htentry Lisp_Hash_Table_Entry; DECLARE_LRECORD (hash_table_entry, Lisp_Hash_Table_Entry); @@ -112,4 +124,6 @@ void inchash_eq (Lisp_Object key, Lisp_Object table, EMACS_INT offset); +htentry *find_htentry (Lisp_Object key, const Lisp_Hash_Table *ht); + #endif /* INCLUDED_elhash_h_ */ diff -r 71bf2c5667ba -r 66411359ce4e src/emacs.c --- a/src/emacs.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/emacs.c Sat Oct 25 21:40:46 2008 +0900 @@ -955,6 +955,42 @@ init_free_hook (); #endif +#define SHEBANG_PROGNAME_LENGTH \ + (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING ("")))) +#define SHEBANG_EXE_PROGNAME_LENGTH \ + (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME) WEXTSTRING(".exe")) \ + - sizeof (WEXTSTRING (""))) + + { + int progname_len = wext_strlen (argv[0]); + if (progname_len >= SHEBANG_PROGNAME_LENGTH) + { + if (!wext_strcmp_ascii (argv[0] + + (progname_len - SHEBANG_PROGNAME_LENGTH), + SHEBANG_PROGNAME) + /* Allow trailing .exe. Don't check it, it could also be + .com. */ + || (progname_len >= SHEBANG_EXE_PROGNAME_LENGTH && + !wext_strncmp_ascii + (argv[0] + (progname_len - SHEBANG_EXE_PROGNAME_LENGTH), + SHEBANG_PROGNAME, + SHEBANG_PROGNAME_LENGTH))) + { + Wexttext **newarr = alloca_array (Wexttext *, argc + 2); + int j; + + newarr[0] = argv[0]; + newarr[1] = WEXTSTRING ("--script"); + for (j = 1; j < argc; ++j) + { + newarr[j + 1] = argv[j]; + } + argv = newarr; + argc++; + } + } + } + sort_args (argc, argv); #if 0 /* defined (_SCO_DS) @@ -1048,6 +1084,20 @@ noninteractive = 1; } + { + int count_before = skip_args; + /* Handle the -script switch, which implies batch and vanilla. The -l + part of its functionality is implemented in Lisp. */ + if (argmatch (argv, argc, "-script", "--script", 0, NULL, + &skip_args)) + { + noninteractive = 1; + vanilla_inhibiting = 1; + } + + /* Don't actually discard this argument. */ + skip_args = count_before; + } #ifdef WIN32_NATIVE { /* Since we aren't a console application, we can't easily be terminated @@ -2162,6 +2212,7 @@ #ifdef HAVE_GTK vars_of_device_gtk (); + vars_of_console_gtk (); #ifdef HAVE_DIALOGS vars_of_dialog_gtk (); #endif @@ -2689,6 +2740,7 @@ { "-sd", "--show-dump-id", 105, 0 }, { "-nd", "--no-dump-file", 95, 0 }, { "-batch", "--batch", 88, 0 }, + { "-script", "--script", 89, 1 }, #ifdef WIN32_NATIVE { "-mswindows-termination-handle", 0, 84, 1 }, { "-nuni", "--no-unicode-lib-calls", 83, 0 }, @@ -2956,13 +3008,14 @@ Do not call this. It will reinitialize your XEmacs. You'll be sorry. */ /* If this function is called from startup.el, it will be possible to run - temacs as an editor using `temacs -batch -l loadup.el run-temacs', instead - of having to dump an emacs and then run that (when debugging emacs itself, - this can be much faster)). [Actually, the speed difference isn't that - much as long as your filesystem is local, and you don't end up with - a dumped version in case you want to rerun it. This function is most - useful when used as part of the `make all-elc' command. --ben] - This will "restart" emacs with the specified command-line arguments. + temacs as an editor using `temacs -batch -l ../lisp/loadup.el + run-temacs', instead of having to dump an emacs and then run that (when + debugging emacs itself, this can be much faster)). [Actually, the speed + difference isn't that much as long as your filesystem is local, and you + don't end up with a dumped version in case you want to rerun it. This + function is most useful when used as part of the `make all-elc' + command. --ben] This will "restart" emacs with the specified command-line + arguments. Martin thinks this function is most useful when using debugging tools like Purify or tcov that get confused by XEmacs' dumping. */ @@ -4245,10 +4298,9 @@ Appropriate surrounding whitespace will be added, but typically looks best if enclosed in parentheses. -A standard use is to indicate the date version.sh was last updated from -the CVS mainline, where it is automatically given a value similar to -\"(+CVS-20050221)\". Developers may also use it to indicate particular -branches, etc. +A standard use is to indicate the topmost hash id of the Mercurial +changeset from which XEmacs was compiled. Developers may also use it +to indicate particular branches, etc. */ ); #ifdef XEMACS_EXTRA_NAME Vxemacs_extra_name = build_string (XEMACS_EXTRA_NAME); diff -r 71bf2c5667ba -r 66411359ce4e src/eval.c --- a/src/eval.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/eval.c Sat Oct 25 21:40:46 2008 +0900 @@ -1356,29 +1356,8 @@ return sym; } -DEFUN ("user-variable-p", Fuser_variable_p, 1, 1, 0, /* -Return t if VARIABLE is intended to be set and modified by users. -\(The alternative is a variable used internally in a Lisp program.) -Determined by whether the first character of the documentation -for the variable is `*'. -*/ - (variable)) -{ - Lisp_Object documentation = Fget (variable, Qvariable_documentation, Qnil); - - return - ((INTP (documentation) && XINT (documentation) < 0) || - - (STRINGP (documentation) && - (string_byte (documentation, 0) == '*')) || - - /* If (STRING . INTEGER), a negative integer means a user variable. */ - (CONSP (documentation) - && STRINGP (XCAR (documentation)) - && INTP (XCDR (documentation)) - && XINT (XCDR (documentation)) < 0)) ? - Qt : Qnil; -} +/* XEmacs: user-variable-p is in symbols.c, since it needs to mess around + with the symbol variable aliases. */ DEFUN ("macroexpand-internal", Fmacroexpand_internal, 1, 2, 0, /* Return result of expanding macros at top level of FORM. @@ -3100,7 +3079,7 @@ /* This function can GC */ Lisp_Object prefixarg; Lisp_Object final = cmd; - struct backtrace backtrace; + PROFILE_DECLARE(); struct console *con = XCONSOLE (Vselected_console); prefixarg = con->prefix_arg; @@ -3533,12 +3512,22 @@ /* This function can GC */ Lisp_Object fun, val, original_fun, original_args; int nargs; - struct backtrace backtrace; + PROFILE_DECLARE(); #ifdef ERROR_CHECK_TRAPPING_PROBLEMS check_proper_critical_section_lisp_protection (); #endif + if (!CONSP (form)) + { + if (SYMBOLP (form)) + { + return Fsymbol_value (form); + } + + return form; + } + /* I think this is a pretty safe place to call Lisp code, don't you? */ while (!in_warnings && !NILP (Vpending_warnings) /* well, perhaps not so safe after all! */ @@ -3571,14 +3560,6 @@ unbind_to (speccount); } - if (!CONSP (form)) - { - if (SYMBOLP (form)) - return Fsymbol_value (form); - else - return form; - } - QUIT; if (need_to_garbage_collect) { @@ -3622,7 +3603,13 @@ /* At this point, only original_fun and original_args have values that will be used below. */ retry: - fun = indirect_function (original_fun, 1); + /* Optimise for no indirection. */ + fun = original_fun; + if (SYMBOLP (fun) && !EQ (fun, Qunbound) + && (fun = XSYMBOL (fun)->function, SYMBOLP (fun))) + { + fun = indirect_function(original_fun, 1); + } if (SUBRP (fun)) { @@ -3791,7 +3778,12 @@ goto invalid_function; } } - else /* ! (SUBRP (fun) || COMPILED_FUNCTIONP (fun) || CONSP (fun)) */ + else if (UNBOUNDP (fun)) + { + val = signal_void_function_error (original_fun); + } + else /* ! (SUBRP (fun) || COMPILED_FUNCTIONP (fun) || CONSP (fun) + UNBOUNDP (fun)) */ { invalid_function: val = signal_invalid_function_error (fun); @@ -3828,7 +3820,7 @@ /* This function can GC */ Lisp_Object fun; Lisp_Object val; - struct backtrace backtrace; + PROFILE_DECLARE(); int fun_nargs = nargs - 1; Lisp_Object *fun_args = args + 1; @@ -6001,13 +5993,23 @@ int *addr = (int *) get_opaque_ptr (opaque); int val; + /* In the event that a C integer will always fit in an Emacs int, we + haven't ever stored a C integer as an opaque pointer. This #ifdef + eliminates a warning on AMD 64, where EMACS_INT has 63 value bits and C + integers have 32 value bits. */ +#if INT_VALBITS < INTBITS if (INTP (lval)) - val = XINT (lval); + { + val = XINT (lval); + } else { val = (int) get_opaque_ptr (lval); free_opaque_ptr (lval); } +#else /* !(INT_VALBITS < INTBITS) */ + val = XINT(lval); +#endif /* INT_VALBITS < INTBITS */ *addr = val; free_opaque_ptr (opaque); @@ -6024,10 +6026,19 @@ Lisp_Object opaque = make_opaque_ptr (addr); Lisp_Object lval; + /* In the event that a C integer will always fit in an Emacs int, we don't + ever want to store a C integer as an opaque pointer. This #ifdef + eliminates a warning on AMD 64, where EMACS_INT has 63 value bits and C + integers have 32 value bits. */ +#if INT_VALBITS <= INTBITS if (NUMBER_FITS_IN_AN_EMACS_INT (val)) lval = make_int (val); else lval = make_opaque_ptr ((void *) val); +#else /* !(INT_VALBITS < INTBITS) */ + lval = make_int (val); +#endif /* INT_VALBITS <= INTBITS */ + return record_unwind_protect (restore_int, noseeum_cons (opaque, lval)); } @@ -6550,7 +6561,6 @@ DEFSUBR (Fdefmacro); DEFSUBR (Fdefvar); DEFSUBR (Fdefconst); - DEFSUBR (Fuser_variable_p); DEFSUBR (Flet); DEFSUBR (FletX); DEFSUBR (Fwhile); diff -r 71bf2c5667ba -r 66411359ce4e src/event-Xt.c --- a/src/event-Xt.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/event-Xt.c Sat Oct 25 21:40:46 2008 +0900 @@ -1493,7 +1493,6 @@ return 0; SET_EVENT_CHANNEL (emacs_event, wrap_frame (frame)); - SET_EVENT_MAGIC_X_EVENT (emacs_event, *x_event_copy); break; } } diff -r 71bf2c5667ba -r 66411359ce4e src/event-unixoid.c --- a/src/event-unixoid.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/event-unixoid.c Sat Oct 25 21:40:46 2008 +0900 @@ -360,10 +360,11 @@ int infd, outfd, errfd; /* Decode inhandle and outhandle. Their meaning depends on the process implementation being used. */ - /* We are passed plain old file descs */ - infd = (int) inhandle; - outfd = (int) outhandle; - errfd = (int) errhandle; + /* We are passed plain old file descs, which are ints, so */ + /* if sizeof(EMACS_INT) > sizeof(int) it's OK. */ + infd = (EMACS_INT) inhandle; + outfd = (EMACS_INT) outhandle; + errfd = (EMACS_INT) errhandle; *instream = (infd >= 0 ? make_filedesc_input_stream (infd, 0, -1, 0) diff -r 71bf2c5667ba -r 66411359ce4e src/event-xlike-inc.c --- a/src/event-xlike-inc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/event-xlike-inc.c Sat Oct 25 21:40:46 2008 +0900 @@ -708,7 +708,15 @@ return Qnil; #ifdef MULE - return make_char (make_ichar (charset, code, 0)); + { + Lisp_Object unified = Funicode_to_char + (Fchar_to_unicode (make_char (make_ichar (charset, code, 0))), Qnil); + if (!NILP (unified)) + { + return unified; + } + return make_char (make_ichar (charset, code, 0)); + } #else return make_char (code + 0x80); #endif diff -r 71bf2c5667ba -r 66411359ce4e src/events.h --- a/src/events.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/events.h Sat Oct 25 21:40:46 2008 +0900 @@ -921,7 +921,28 @@ #define XEMACS_MOD_BUTTON3 (1<<8) #define XEMACS_MOD_BUTTON4 (1<<9) #define XEMACS_MOD_BUTTON5 (1<<10) - +#define XEMACS_MOD_BUTTON6 (1<<11) +#define XEMACS_MOD_BUTTON7 (1<<12) +#define XEMACS_MOD_BUTTON8 (1<<13) +#define XEMACS_MOD_BUTTON9 (1<<14) +#define XEMACS_MOD_BUTTON10 (1<<15) +#define XEMACS_MOD_BUTTON11 (1<<16) +#define XEMACS_MOD_BUTTON12 (1<<17) +#define XEMACS_MOD_BUTTON13 (1<<18) +#define XEMACS_MOD_BUTTON14 (1<<19) +#define XEMACS_MOD_BUTTON15 (1<<20) +#define XEMACS_MOD_BUTTON16 (1<<21) +#define XEMACS_MOD_BUTTON17 (1<<22) +#define XEMACS_MOD_BUTTON18 (1<<23) +#define XEMACS_MOD_BUTTON19 (1<<24) +#define XEMACS_MOD_BUTTON20 (1<<25) +#define XEMACS_MOD_BUTTON21 (1<<26) +#define XEMACS_MOD_BUTTON22 (1<<27) +#define XEMACS_MOD_BUTTON23 (1<<28) +#define XEMACS_MOD_BUTTON24 (1<<29) +#define XEMACS_MOD_BUTTON25 (1<<30) +#define XEMACS_MOD_BUTTON26 (1<<31) + /* 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 XEMACS_MOD_META instead. diff -r 71bf2c5667ba -r 66411359ce4e src/extents.c --- a/src/extents.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/extents.c Sat Oct 25 21:40:46 2008 +0900 @@ -720,9 +720,7 @@ prev->next = p->next; else ga->markers = p->next; -#ifdef NEW_GC - mc_free (m); -#else /* not NEW_GC */ +#ifndef NEW_GC m->next = gap_array_marker_freelist; m->pos = 0xDEADBEEF; /* -559038737 base 10 */ gap_array_marker_freelist = m; diff -r 71bf2c5667ba -r 66411359ce4e src/extw-Xt.c --- a/src/extw-Xt.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/extw-Xt.c Sat Oct 25 21:40:46 2008 +0900 @@ -37,39 +37,9 @@ #include #include #include +#include "compiler.h" #include "extw-Xt.h" -/* Yeah, that's portable! - - Why the hell didn't the Xt people just export this function - for real? */ - -#if (XT_REVISION > 5) -EXTERN_C int -_XtWaitForSomething (XtAppContext app, _XtBoolean ignoreEvents, - _XtBoolean ignoreTimers, _XtBoolean ignoreInputs, - _XtBoolean ignoreSignals, _XtBoolean block, -#ifdef XTHREADS - _XtBoolean drop_lock, -#endif - unsigned long *howlong); - -# ifndef XTHREADS -# define _XT_WAIT_FOR_SOMETHING(timers,inputs,events,block,howlong,appCtx) \ - _XtWaitForSomething (appCtx,events,timers,inputs,0,block,howlong) -# else -# define _XT_WAIT_FOR_SOMETHING(timers,inputs,events,block,howlong,appCtx) \ - _XtWaitForSomething (appCtx,events,timers,inputs,0,block,1,howlong) -# endif -#else -EXTERN_C int -_XtwaitForSomething (Boolean ignoreTimers, Boolean ignoreInputs, - Boolean ignoreEvents, Boolean block, - unsigned long *howlong, XtAppContext app); -# define _XT_WAIT_FOR_SOMETHING(timers,inputs,events,block,howlong,appCtx) \ - _XtwaitForSomething (timers,inputs,events,block,howlong,appCtx) -#endif - #ifdef DEBUG_WIDGET static int geom_masks[] = { @@ -181,60 +151,87 @@ #endif } -typedef struct { - Widget w; - unsigned long request_num; - en_extw_notify type; +typedef struct +{ + Widget w; + unsigned long request_num; + en_extw_notify type; } QueryStruct; /* check if an event is of the sort we're looking for */ static Bool -isMine(Display *dpy, XEvent *event, char *arg) +isMine(XEvent *event, QueryStruct *q) { - QueryStruct *q = (QueryStruct *) arg; - Widget w = q->w; + Widget w = q->w; - if ( (dpy != XtDisplay(w)) || (event->xany.window != XtWindow(w)) ) { - return FALSE; + if ( (event->xany.display != XtDisplay(w)) || (event->xany.window != XtWindow(w)) ) + { + return FALSE; + } + if (event->xany.serial >= q->request_num) + { + if (event->type == ClientMessage && + event->xclient.message_type == a_EXTW_NOTIFY && + event->xclient.data.l[0] == 1 - extw_which_side && + event->xclient.data.l[1] == (int) q->type) + { + return TRUE; } - if (event->xany.serial >= q->request_num) { - if (event->type == ClientMessage && - event->xclient.message_type == a_EXTW_NOTIFY && - event->xclient.data.l[0] == 1 - extw_which_side && - (en_extw_notify) event->xclient.data.l[1] == q->type) - return TRUE; - } - return FALSE; + } + return FALSE; +} + +void responseTimeOut(XtPointer clientData, XtIntervalId * UNUSED (id)) +{ + Bool *expired=(Bool *)clientData; + *expired=TRUE; } /* wait for a ClientMessage of the specified type from the other widget, or - time-out. isMine() determines whether an event matches. Culled from - Shell.c. */ + time-out. isMine() determines whether an event matches. + Took out the call to _XtWaitForSomething and replaced it with public + Xt api's. +*/ Bool extw_wait_for_response (Widget w, XEvent *event, unsigned long request_num, en_extw_notify type, unsigned long timeout) { XtAppContext app = XtWidgetToApplicationContext(w); + XtInputMask inputMask; QueryStruct q; + Bool expired; + XtIntervalId id; - XFlush(XtDisplay(w)); q.w = w; q.request_num = request_num; q.type = type; + expired=FALSE; - for(;;) + id=XtAppAddTimeOut(app, timeout, responseTimeOut,&expired); + while (!expired) { - /* - * look for match event - */ - if (XCheckIfEvent (XtDisplay(w), event, isMine, (char*)&q)) - return TRUE; - if (_XT_WAIT_FOR_SOMETHING (TRUE, TRUE, FALSE, TRUE, &timeout, app) - != -1) - continue; - if (timeout == 0) - return FALSE; + inputMask=XtAppPending(app); + if (inputMask & XtIMXEvent) + { + XtAppNextEvent(app, event); + if (isMine(event,&q)) + { + if (!expired) XtRemoveTimeOut(id); + return True; + } + else + { + /* Do Nothing and go back to waiting */ + } + } + if (inputMask & XtIMTimer) + { + /* Process the expired timer */ + XtAppProcessEvent(app,XtIMTimer); + } } + /* Must have expired */ + return False; } diff -r 71bf2c5667ba -r 66411359ce4e src/faces.c --- a/src/faces.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/faces.c Sat Oct 25 21:40:46 2008 +0900 @@ -76,7 +76,7 @@ Fixnum debug_x_faces; #endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) #ifdef DEBUG_XEMACS # define DEBUG_FACES(FORMAT, ...) \ @@ -587,7 +587,7 @@ struct gcpro gcpro1; if (!NILP (charset)) - matchspec = noseeum_cons (charset, + matchspec = noseeum_cons (charset, stage == initial ? Qinitial : Qfinal); GCPRO1 (matchspec); @@ -725,21 +725,21 @@ if (noninteractive) { if (ascent) - *ascent = 1; + *ascent = 1; if (descent) - *descent = 0; + *descent = 0; if (height) - *height = 1; + *height = 1; if (width) - *width = 1; + *width = 1; if (proportional_p) - *proportional_p = 0; + *proportional_p = 0; return; } /* We use ASCII here. This is reasonable because the people calling this function are using the resulting values to come up with overall sizes - for windows and frames. + for windows and frames. It's possible for this function to get called when the face cachels have not been initialized--put a call to debug-print in @@ -748,7 +748,7 @@ if (WINDOWP (domain) && (w = XWINDOW (domain)) && w->face_cachels) { if (!Dynarr_length (w->face_cachels)) - reset_face_cachels (w); + reset_face_cachels (w); cachel = WINDOW_FACE_CACHEL (w, DEFAULT_INDEX); font_instance = FACE_CACHEL_FONT (cachel, Vcharset_ascii); } @@ -956,15 +956,15 @@ /* DO NOT change the selected frame here. If the debugger goes off - it will try and display on the frame being created, but it is not - ready for that yet and a horrible death will occur. Any random - code depending on the selected-frame as an implicit arg should be - tracked down and shot. For the benefit of the one known, - xpm-color-symbols, make-frame sets the variable - Vframe_being_created to the frame it is making and sets it to nil - when done. Internal functions that this could trigger which are - currently depending on selected-frame should use this instead. It - is not currently visible at the lisp level. */ + it will try and display on the frame being created, but it is not + ready for that yet and a horrible death will occur. Any random + code depending on the selected-frame as an implicit arg should be + tracked down and shot. For the benefit of the one known, + xpm-color-symbols, make-frame sets the variable + Vframe_being_created to the frame it is making and sets it to nil + when done. Internal functions that this could trigger which are + currently depending on selected-frame should use this instead. It + is not currently visible at the lisp level. */ call_critical_lisp_code (XDEVICE (FRAME_DEVICE (frm)), Qinit_frame_faces, tframe); } @@ -1094,7 +1094,7 @@ int bound = 1, final_stage = 0; int offs = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; - if (!UNBOUNDP (cachel->font[offs]) && + if (!UNBOUNDP (cachel->font[offs]) && bit_vector_bit(FACE_CACHEL_FONT_UPDATED (cachel), offs)) return cachel->font[offs]; @@ -1121,7 +1121,7 @@ new_val = oth->font[offs]; set_bit_vector_bit(FACE_CACHEL_FONT_SPECIFIED(cachel), offs, 1); set_bit_vector_bit - (FACE_CACHEL_FONT_FINAL_STAGE(cachel), offs, + (FACE_CACHEL_FONT_FINAL_STAGE(cachel), offs, bit_vector_bit(FACE_CACHEL_FONT_FINAL_STAGE(oth), offs)); break; } @@ -1137,7 +1137,7 @@ new_val = oth->font[offs]; } - if (!UNBOUNDP (cachel->font[offs]) && + if (!UNBOUNDP (cachel->font[offs]) && !EQ (cachel->font[offs], new_val)) cachel->dirty = 1; set_bit_vector_bit(FACE_CACHEL_FONT_UPDATED(cachel), offs, 1); @@ -1158,8 +1158,8 @@ ERROR_ME_DEBUG_WARN, 1, Qzero, initial); DEBUG_FACES("just called f_p_m_i on face %s, charset %s, initial, " - "result was something %s\n", - XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), + "result was something %s\n", + XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), XSTRING_DATA(XSYMBOL_NAME(XCHARSET_NAME(charset))), UNBOUNDP(new_val) ? "not bound" : "bound"); @@ -1173,12 +1173,12 @@ new_val = face_property_matching_instance (face, Qfont, charset, domain, ERROR_ME_DEBUG_WARN, 0, - Qzero, + Qzero, initial); DEBUG_FACES("just called f_p_m_i on face %s, charset %s, initial, " - "allow fallback, result was something %s\n", - XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), + "allow fallback, result was something %s\n", + XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), XSTRING_DATA(XSYMBOL_NAME(XCHARSET_NAME(charset))), UNBOUNDP(new_val) ? "not bound" : "bound"); @@ -1192,12 +1192,12 @@ new_val = face_property_matching_instance (face, Qfont, charset, domain, ERROR_ME_DEBUG_WARN, 1, - Qzero, + Qzero, final); DEBUG_FACES("just called f_p_m_i on face %s, charset %s, final, " - "result was something %s\n", - XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), + "result was something %s\n", + XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), XSTRING_DATA(XSYMBOL_NAME(XCHARSET_NAME(charset))), UNBOUNDP(new_val) ? "not bound" : "bound"); /* Tell X11 redisplay that it should translate to iso10646-1. */ @@ -1214,12 +1214,12 @@ new_val = face_property_matching_instance (face, Qfont, charset, domain, ERROR_ME_DEBUG_WARN, 0, - Qzero, + Qzero, final); DEBUG_FACES("just called f_p_m_i on face %s, charset %s, initial, " - "allow fallback, result was something %s\n", - XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), + "allow fallback, result was something %s\n", + XSTRING_DATA(XSYMBOL_NAME(XFACE(cachel->face)->name)), XSTRING_DATA(XSYMBOL_NAME(XCHARSET_NAME(charset))), UNBOUNDP(new_val) ? "not bound" : "bound"); if (!UNBOUNDP(new_val)) @@ -1236,7 +1236,7 @@ set_bit_vector_bit(FACE_CACHEL_FONT_UPDATED(cachel), offs, 1); set_bit_vector_bit(FACE_CACHEL_FONT_FINAL_STAGE(cachel), offs, final_stage); - set_bit_vector_bit(FACE_CACHEL_FONT_SPECIFIED(cachel), offs, + set_bit_vector_bit(FACE_CACHEL_FONT_SPECIFIED(cachel), offs, (bound || EQ (face, Vdefault_face))); cachel->font[offs] = new_val; return new_val; @@ -1379,8 +1379,8 @@ cachel->face = face; /* We normally only set the _specified flags if the value was - actually bound. The exception is for the default face where - we always set it since it is the ultimate fallback. */ + actually bound. The exception is for the default face where + we always set it since it is the ultimate fallback. */ FROB (foreground); FROB (background); @@ -1509,7 +1509,7 @@ set_bit_vector_bit(FACE_CACHEL_FONT_SPECIFIED(cachel), offs, 1); /* Also propagate whether we're translating to Unicode for the given face. */ - set_bit_vector_bit(FACE_CACHEL_FONT_FINAL_STAGE(cachel), offs, + set_bit_vector_bit(FACE_CACHEL_FONT_FINAL_STAGE(cachel), offs, bit_vector_bit(FACE_CACHEL_FONT_FINAL_STAGE (Dynarr_atp(w->face_cachels, findex)), offs)); @@ -1584,6 +1584,7 @@ if (w->face_cachels) { int i; + face_index fi; for (i = 0; i < Dynarr_length (w->face_cachels); i++) { @@ -1592,8 +1593,15 @@ Dynarr_free (cachel->merged_faces); } Dynarr_reset (w->face_cachels); - get_builtin_face_cache_index (w, Vdefault_face); - get_builtin_face_cache_index (w, Vmodeline_face); + /* #### NOTE: be careful with the order ! + The cpp macros DEFAULT_INDEX and MODELINE_INDEX defined in + redisplay.h depend on the code below. Please make sure to assert the + correct values if you ever add new built-in faces here. + -- dvl */ + fi = get_builtin_face_cache_index (w, Vdefault_face); + assert (noninteractive || fi == DEFAULT_INDEX); + fi = get_builtin_face_cache_index (w, Vmodeline_face); + assert (noninteractive || fi == MODELINE_INDEX); XFRAME (w->frame)->window_face_cache_reset = 1; } } @@ -1618,7 +1626,7 @@ struct face_cachel *cachel = Dynarr_atp (w->face_cachels, elt); cachel->updated = 0; - memset(FACE_CACHEL_FONT_UPDATED(cachel)->bits, 0, + memset(FACE_CACHEL_FONT_UPDATED(cachel)->bits, 0, BIT_VECTOR_LONG_STORAGE (NUM_LEADING_BYTES)); } } @@ -1987,7 +1995,7 @@ #define COPY_PROPERTY(property) \ Fcopy_specifier (fold->property, fnew->property, \ - locale, tag_set, exact_p, how_to_add); + locale, tag_set, exact_p, how_to_add); COPY_PROPERTY (foreground); COPY_PROPERTY (background); @@ -2013,8 +2021,8 @@ Lisp_Object Qone_dimensional, Qtwo_dimensional, Qx_coverage_instantiator; -DEFUN ("specifier-tag-one-dimensional-p", - Fspecifier_tag_one_dimensional_p, +DEFUN ("specifier-tag-one-dimensional-p", + Fspecifier_tag_one_dimensional_p, 2, 2, 0, /* Return non-nil if (charset-dimension CHARSET) is 1. @@ -2027,8 +2035,8 @@ return (1 == XCHARSET_DIMENSION(charset)) ? Qt : Qnil; } -DEFUN ("specifier-tag-two-dimensional-p", - Fspecifier_tag_two_dimensional_p, +DEFUN ("specifier-tag-two-dimensional-p", + Fspecifier_tag_two_dimensional_p, 2, 2, 0, /* Return non-nil if (charset-dimension CHARSET) is 2. @@ -2041,34 +2049,34 @@ return (2 == XCHARSET_DIMENSION(charset)) ? Qt : Qnil; } -DEFUN ("specifier-tag-final-stage-p", - Fspecifier_tag_final_stage_p, +DEFUN ("specifier-tag-final-stage-p", + Fspecifier_tag_final_stage_p, 2, 2, 0, /* Return non-nil if STAGE is 'final. Used by the X11 platform font code for giving fallbacks; see -`define-specifier-tag'. You shouldn't ever need to call this. +`define-specifier-tag'. You shouldn't ever need to call this. */ (UNUSED(charset), stage)) { return EQ(stage, Qfinal) ? Qt : Qnil; } -DEFUN ("specifier-tag-initial-stage-p", - Fspecifier_tag_initial_stage_p, +DEFUN ("specifier-tag-initial-stage-p", + Fspecifier_tag_initial_stage_p, 2, 2, 0, /* Return non-nil if STAGE is 'initial. Used by the X11 platform font code for giving fallbacks; see -`define-specifier-tag'. You shouldn't ever need to call this. +`define-specifier-tag'. You shouldn't ever need to call this. */ (UNUSED(charset), stage)) { return EQ(stage, Qinitial) ? Qt : Qnil; } -DEFUN ("specifier-tag-encode-as-utf-8-p", - Fspecifier_tag_encode_as_utf_8_p, +DEFUN ("specifier-tag-encode-as-utf-8-p", + Fspecifier_tag_encode_as_utf_8_p, 2, 2, 0, /* Return t if and only if (charset-property CHARSET 'encode-as-utf-8)). @@ -2271,12 +2279,12 @@ call. We should use this facility. */ "Monospace-12", /* do we need to worry about non-Latin characters for monospace? - No, at least in Debian's implementation of Xft. + No, at least in Debian's implementation of Xft. We should recommend that "gothic" and "mincho" aliases be created? */ "Sazanami Mincho-12", /* Japanese #### add encoding info? */ - /* Arphic for Chinese? */ - /* Korean */ + /* Arphic for Chinese? */ + /* Korean */ #else /* The default Japanese fonts installed with XFree86 4.0 use this point size, and the -misc-fixed fonts (which look really bad with @@ -2302,10 +2310,10 @@ define_specifier_tag(Qone_dimensional, Qnil, intern ("specifier-tag-one-dimensional-p")); - define_specifier_tag(Qinitial, Qnil, + define_specifier_tag(Qinitial, Qnil, intern ("specifier-tag-initial-stage-p")); - define_specifier_tag(Qfinal, Qnil, + define_specifier_tag(Qfinal, Qnil, intern ("specifier-tag-final-stage-p")); define_specifier_tag (Qencode_as_utf_8, Qnil, @@ -2327,12 +2335,12 @@ #else /* !USE_XFT */ inst_list = - Fcons + Fcons (Fcons - (list1 (device_symbol), + (list1 (device_symbol), build_string ("*")), inst_list); -#ifdef MULE +#ifdef MULE /* For Han characters and Ethiopic, we want the misc-fixed font used to be distinct from that for alphabetic scripts, because the font @@ -2340,11 +2348,11 @@ (this is slightly less so) and because its coverage isn't up to handling them (well, chiefly, it's not up to handling Ethiopic--we do have charset-specific fallbacks for the East Asian charsets.) */ - inst_list = + inst_list = Fcons (Fcons - (list4(device_symbol, Qtwo_dimensional, Qfinal, Qx_coverage_instantiator), - build_string + (list4(device_symbol, Qtwo_dimensional, Qfinal, Qx_coverage_instantiator), + build_string ("-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1")), inst_list); @@ -2352,16 +2360,16 @@ when a given charset's registries can't be found and redisplay for that charset falls back to iso10646-1. */ - inst_list = + inst_list = Fcons (Fcons - (list4(device_symbol, Qone_dimensional, Qfinal, Qx_coverage_instantiator), - build_string - ("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")), + (list4(device_symbol, Qone_dimensional, Qfinal, Qx_coverage_instantiator), + build_string + ("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")), inst_list); for (fontptr = fonts + countof(fonts) - 1; fontptr >= fonts; fontptr--) - inst_list = Fcons (Fcons (list3 (device_symbol, + inst_list = Fcons (Fcons (list3 (device_symbol, Qtwo_dimensional, Qinitial), build_string (*fontptr)), inst_list); @@ -2372,12 +2380,12 @@ above). They also use Markus Kuhn's ISO 10646-1 fixed fonts for redisplay. */ - inst_list = + inst_list = Fcons (Fcons - (list4(device_symbol, Qencode_as_utf_8, Qinitial, Qx_coverage_instantiator), - build_string - ("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")), + (list4(device_symbol, Qencode_as_utf_8, Qinitial, Qx_coverage_instantiator), + build_string + ("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1")), inst_list); #endif /* MULE */ @@ -2385,9 +2393,9 @@ /* Needed to make sure that charsets with non-specified fonts don't use bold and oblique first if medium and regular are available. */ inst_list = - Fcons + Fcons (Fcons - (list1 (device_symbol), + (list1 (device_symbol), build_string ("-*-*-medium-r-*-*-*-120-*-*-c-*-*-*")), inst_list); @@ -2398,9 +2406,9 @@ here gave horrendous results. */ inst_list = - Fcons + Fcons (Fcons - (list1 (device_symbol), + (list1 (device_symbol), build_string ("-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-*-*")), inst_list); @@ -2416,28 +2424,28 @@ #ifdef HAVE_MS_WINDOWS { const Ascbyte *mswfonts[] = - { - "Courier New:Regular:10::", - "Courier:Regular:10::", - ":Regular:10::" - }; + { + "Courier New:Regular:10::", + "Courier:Regular:10::", + ":Regular:10::" + }; const Ascbyte **mswfontptr; for (mswfontptr = mswfonts + countof (mswfonts) - 1; mswfontptr >= mswfonts; mswfontptr--) - { - /* display device */ - inst_list = Fcons (Fcons (list1 (Qmswindows), - build_string (*mswfontptr)), - inst_list); - /* printer device */ - inst_list = Fcons (Fcons (list1 (Qmsprinter), - build_string (*mswfontptr)), - inst_list); - } + { + /* display device */ + inst_list = Fcons (Fcons (list1 (Qmswindows), + build_string (*mswfontptr)), + inst_list); + /* printer device */ + inst_list = Fcons (Fcons (list1 (Qmsprinter), + build_string (*mswfontptr)), + inst_list); + } /* Use Lucida Console rather than Courier New if it exists -- the - line spacing is much less, so many more lines fit with the same - size font. (And it's specifically designed for screens.) */ + line spacing is much less, so many more lines fit with the same + size font. (And it's specifically designed for screens.) */ inst_list = Fcons (Fcons (list1 (Qmswindows), build_string ("Lucida Console:Regular:10::")), inst_list); diff -r 71bf2c5667ba -r 66411359ce4e src/file-coding.c --- a/src/file-coding.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/file-coding.c Sat Oct 25 21:40:46 2008 +0900 @@ -229,6 +229,8 @@ Lisp_Object QScoding_system_cookie; +Lisp_Object Qposix_charset_to_coding_system_hash; + /* This is used to convert autodetected coding systems into existing systems. For example, the chain undecided->convert-eol-autodetect may have its separate parts detected as mswindows-multibyte and @@ -469,6 +471,89 @@ return CODING_SYSTEMP (object) ? Qt : Qnil; } +static Lisp_Object +find_coding_system (Lisp_Object coding_system_or_name, + int do_autoloads) +{ + Lisp_Object lookup; + + if (NILP (coding_system_or_name)) + coding_system_or_name = Qbinary; + else if (CODING_SYSTEMP (coding_system_or_name)) + return coding_system_or_name; + else + CHECK_SYMBOL (coding_system_or_name); + + while (1) + { + lookup = + Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil); + + if (CONSP (lookup) && do_autoloads) + { + struct gcpro gcpro1; + int length; + DECLARE_EISTRING (desired_base); + DECLARE_EISTRING (warning_info); + + eicpy_lstr (desired_base, XSYMBOL_NAME (coding_system_or_name)); + + /* Work out the name of the base coding system. */ + length = eilen (desired_base); + if (length > (int)(sizeof ("-unix") - 1)) + { + if (0 == qxestrcmp ((UAscbyte *)"-unix", (eidata (desired_base)) + + (length - (sizeof ("-unix") - 1)))) + { + eidel (desired_base, length - (sizeof ("-unix") - 1), + -1, 5, 5); + } + } + else if (length > (int)(sizeof ("-dos") - 1)) + { + if ((0 == qxestrcmp ((UAscbyte *)"-dos", (eidata (desired_base)) + + (length - (sizeof ("-dos") - 1)))) || + (0 == qxestrcmp ((UAscbyte *)"-mac", (eidata (desired_base)) + + (length - (sizeof ("-mac") - 1))))) + { + eidel (desired_base, length - (sizeof ("-dos") - 1), -1, + 4, 4); + } + } + + coding_system_or_name = intern_int (eidata (desired_base)); + + /* Remove this coding system and its subsidiary coding + systems from the hash, to avoid calling this code recursively. */ + Fremhash (coding_system_or_name, Vcoding_system_hash_table); + Fremhash (add_suffix_to_symbol(coding_system_or_name, "-unix"), + Vcoding_system_hash_table); + Fremhash (add_suffix_to_symbol(coding_system_or_name, "-dos"), + Vcoding_system_hash_table); + Fremhash (add_suffix_to_symbol(coding_system_or_name, "-mac"), + Vcoding_system_hash_table); + + eicpy_ascii (warning_info, "Error autoloading coding system "); + eicat_lstr (warning_info, XSYMBOL_NAME (coding_system_or_name)); + + /* Keep around the form so it doesn't disappear from under + #'eval's feet. */ + GCPRO1 (lookup); + call1_trapping_problems ((const CIbyte *)eidata (warning_info), + Qeval, lookup, 0); + UNGCPRO; + + lookup = + Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil); + } + + if (CODING_SYSTEMP (lookup) || NILP (lookup)) + return lookup; + + coding_system_or_name = lookup; + } +} + DEFUN ("find-coding-system", Ffind_coding_system, 1, 1, 0, /* Retrieve the coding system of the given name. @@ -479,22 +564,77 @@ */ (coding_system_or_name)) { - if (NILP (coding_system_or_name)) - coding_system_or_name = Qbinary; - else if (CODING_SYSTEMP (coding_system_or_name)) - return coding_system_or_name; - else - CHECK_SYMBOL (coding_system_or_name); - - while (1) + return find_coding_system(coding_system_or_name, 1); +} + +DEFUN ("autoload-coding-system", Fautoload_coding_system, 2, 2, 0, /* +Define SYMBOL as a coding-system that is loaded on demand. + +FORM is a form to evaluate to define the coding-system. +*/ + (symbol, form)) +{ + Lisp_Object lookup; + + CHECK_SYMBOL (symbol); + CHECK_CONS (form); + + lookup = find_coding_system (symbol, 0); + + if (!NILP (lookup) && + /* Allow autoloads to be redefined. */ + !CONSP (lookup)) { - coding_system_or_name = - Fgethash (coding_system_or_name, Vcoding_system_hash_table, Qnil); - - if (CODING_SYSTEMP (coding_system_or_name) - || NILP (coding_system_or_name)) - return coding_system_or_name; + invalid_operation ("Cannot redefine existing coding system", + symbol); } + + Fputhash (symbol, form, Vcoding_system_hash_table); + Fputhash (add_suffix_to_symbol(symbol, "-unix"), form, + Vcoding_system_hash_table); + Fputhash (add_suffix_to_symbol(symbol, "-dos"), form, + Vcoding_system_hash_table); + Fputhash (add_suffix_to_symbol(symbol, "-mac"), form, + Vcoding_system_hash_table); + + /* Tell the POSIX locale infrastructure about this coding system (though + unfortunately it'll be too late for the startup locale sniffing. */ + if (!UNBOUNDP (Qposix_charset_to_coding_system_hash)) + { + Lisp_Object val = Fsymbol_value (Qposix_charset_to_coding_system_hash); + DECLARE_EISTRING (minimal_name); + Ibyte *full_name; + int len = XSTRING_LENGTH (XSYMBOL_NAME (symbol)), i; + + if (!NILP (val)) + { + full_name = XSTRING_DATA (XSYMBOL_NAME (symbol)); + for (i = 0; i < len; ++i) + { + if (full_name[i] >= '0' && full_name[i] <= '9') + { + eicat_ch (minimal_name, full_name[i]); + } + else if (full_name[i] >= 'a' && full_name[i] <= 'z') + { + eicat_ch (minimal_name, full_name[i]); + } + else if (full_name[i] >= 'A' && full_name[i] <= 'Z') + { + eicat_ch (minimal_name, full_name[i] + + ('a' - 'A')); + } + } + + if (eilen (minimal_name)) + { + CHECK_HASH_TABLE (val); + Fputhash (eimake_string(minimal_name), symbol, val); + } + } + } + + return Qt; } DEFUN ("get-coding-system", Fget_coding_system, 1, 1, 0, /* @@ -651,7 +791,7 @@ }; static int -add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object UNUSED (value), +add_coding_system_to_list_mapper (Lisp_Object key, Lisp_Object value, void *coding_system_list_closure) { /* This function can GC */ @@ -660,9 +800,13 @@ Lisp_Object *coding_system_list = cscl->coding_system_list; /* We can't just use VALUE because KEY might be an alias, and we need - the real coding system object. */ - if (XCODING_SYSTEM (Ffind_coding_system (key))->internal_p ? - cscl->internal : cscl->normal) + the real coding system object. + + Autoloaded coding systems have conses for their values, and can't be + internal coding systems, or coding system aliases. */ + if (CONSP (value) || + (XCODING_SYSTEM (Ffind_coding_system (key))->internal_p ? + cscl->internal : cscl->normal)) *coding_system_list = Fcons (key, *coding_system_list); return 0; } @@ -921,9 +1065,13 @@ else CHECK_SYMBOL (name_or_existing); - if (!NILP (Ffind_coding_system (name_or_existing))) + /* See is there an entry for name_or_existing in the defined coding system + hash table. */ + csobj = find_coding_system (name_or_existing, 0); + /* Error if it's there and not an autoload form. */ + if (!NILP (csobj) && !CONSP (csobj)) invalid_operation ("Cannot redefine existing coding system", - name_or_existing); + name_or_existing); cs = allocate_coding_system (meths, meths->extra_data_size, name_or_existing); @@ -999,6 +1147,8 @@ XCODING_SYSTEM_EOL_TYPE (csobj) = EOL_AUTODETECT; /* for copy-coding-system below */ + Fputhash (name_or_existing, csobj, Vcoding_system_hash_table); + if (need_to_setup_eol_systems && !cs->internal_p) setup_eol_coding_systems (csobj); else if (eol_wrapper == EOL_CR || eol_wrapper == EOL_CRLF) @@ -1037,8 +1187,6 @@ } XCODING_SYSTEM_EOL_TYPE (csobj) = eol_wrapper; } - - Fputhash (name_or_existing, csobj, Vcoding_system_hash_table); return csobj; } @@ -1357,7 +1505,7 @@ The following additional properties are recognized if TYPE is `undecided': -[[ Doesn't GNU use \"detect-*\" for the following two? ]] +\[[ Doesn't GNU use \"detect-*\" for the following two? ]] `do-eol' Do EOL detection. @@ -1396,7 +1544,7 @@ Lisp_Object new_coding_system; old_coding_system = Fget_coding_system (old_coding_system); new_coding_system = - UNBOUNDP (new_name) ? Qnil : Ffind_coding_system (new_name); + UNBOUNDP (new_name) ? Qnil : find_coding_system (new_name, 0); if (NILP (new_coding_system)) { new_coding_system = @@ -3520,7 +3668,7 @@ } } if (NILP (retval)) - retval = Fget_coding_system (Qraw_text); + retval = Fget_coding_system (Qbinary); return retval; } else @@ -3869,6 +4017,9 @@ random result when doing subprocess detection. */ detect_coding_type (data->st, src, n); data->actual = detected_coding_system (data->st); + /* kludge to prevent infinite recursion */ + if (XCODING_SYSTEM(data->actual)->methods->enumtype == undecided_coding_system) + data->actual = Fget_coding_system (Qbinary); } } /* We need to set the detected coding system if we actually have @@ -4383,6 +4534,7 @@ DEFSUBR (Fvalid_coding_system_type_p); DEFSUBR (Fcoding_system_type_list); DEFSUBR (Fcoding_system_p); + DEFSUBR (Fautoload_coding_system); DEFSUBR (Ffind_coding_system); DEFSUBR (Fget_coding_system); DEFSUBR (Fcoding_system_list); @@ -4454,6 +4606,8 @@ DEFSYMBOL (Qcanonicalize_after_coding); + DEFSYMBOL (Qposix_charset_to_coding_system_hash); + DEFSYMBOL (Qescape_quoted); #ifdef HAVE_ZLIB diff -r 71bf2c5667ba -r 66411359ce4e src/fileio.c --- a/src/fileio.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/fileio.c Sat Oct 25 21:40:46 2008 +0900 @@ -111,6 +111,11 @@ Lisp_Object Vdirectory_sep_char; +#ifdef HAVE_FSYNC +/* Nonzero means skip the call to fsync in Fwrite-region. */ +int write_region_inhibit_fsync; +#endif + /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -122,6 +127,7 @@ static Lisp_Object Vinhibit_file_name_operation; Lisp_Object Qfile_already_exists; +Lisp_Object Qexcl; Lisp_Object Qauto_save_hook; Lisp_Object Qauto_save_error; @@ -623,11 +629,12 @@ In addition, this function makes an attempt to choose a name that does not specify an existing file. To make this work, PREFIX should -be an absolute file name. A reasonable idiom is - -\(make-temp-name (expand-file-name "myprefix" (temp-directory))) - -which puts the file in the OS-specified temporary directory. +be an absolute file name. + +This function is analagous to mktemp(3) under POSIX, and as with it, there +exists a race condition between the test for the existence of the new file +and its creation. See `make-temp-file' for a function which avoids this +race condition by specifying the appropriate flags to `write-region'. */ (prefix)) { @@ -1516,10 +1523,10 @@ /* This function can GC. GC checked 2000-07-28 ben. */ Ibyte *nm; - Ibyte *s, *p, *o, *x, *endp; + Ibyte *s, *p, *o, *x, *endp, *got; Ibyte *target = 0; int total = 0; - int substituted = 0; + int substituted = 0, seen_braces; Ibyte *xnm; Lisp_Object handler; @@ -1574,7 +1581,10 @@ { p++; if (p == endp) - goto badsubst; + { + /* No substitution, no error. */ + break; + } else if (*p == '$') { /* "$$" means a single "$" */ @@ -1587,7 +1597,12 @@ { o = ++p; while (p != endp && *p != '}') p++; - if (*p != '}') goto missingclose; + if (*p != '}') + { + /* No substitution, no error. Keep looking. */ + p = o; + continue; + } s = p; } else @@ -1606,10 +1621,12 @@ #endif /* WIN32_NATIVE */ /* Get variable value */ - o = egetenv ((CIbyte *) target); - if (!o) goto badvar; - total += qxestrlen (o); - substituted = 1; + got = egetenv ((CIbyte *) target); + if (got) + { + total += qxestrlen (got); + substituted = 1; + } } if (!substituted) @@ -1627,8 +1644,12 @@ else { p++; + seen_braces = 0; if (p == endp) - goto badsubst; + { + *x++ = '$'; + break; + } else if (*p == '$') { *x++ = *p++; @@ -1636,9 +1657,16 @@ } else if (*p == '{') { + seen_braces = 1; o = ++p; while (p != endp && *p != '}') p++; - if (*p != '}') goto missingclose; + if (*p != '}') + { + /* Don't syntax error, don't substitute */ + *x++ = '{'; + p = o; + continue; + } s = p++; } else @@ -1657,12 +1685,30 @@ #endif /* WIN32_NATIVE */ /* Get variable value */ - o = egetenv ((CIbyte *) target); - if (!o) - goto badvar; - - qxestrcpy (x, o); - x += qxestrlen (o); + got = egetenv ((CIbyte *) target); + if (got) + { + qxestrcpy (x, got); + x += qxestrlen (got); + } + else + { + *x++ = '$'; + if (seen_braces) + { + *x++ = '{'; + /* Preserve the original case. */ + qxestrncpy (x, o, s - o); + x += s - o; + *x++ = '}'; + } + else + { + /* Preserve the original case. */ + qxestrncpy (x, o, s - o); + x += s - o; + } + } } *x = 0; @@ -1687,17 +1733,6 @@ #endif return make_string (xnm, x - xnm); - - badsubst: - syntax_error ("Bad format environment-variable substitution", filename); - missingclose: - syntax_error ("Missing \"}\" in environment-variable substitution", - filename); - badvar: - syntax_error_2 ("Substituting nonexistent environment variable", - filename, build_intstring (target)); - - RETURN_NOT_REACHED (Qnil); } /* A slightly faster and more convenient way to get @@ -2169,6 +2204,10 @@ unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. A number as third arg means request confirmation if LINKNAME already exists. This happens for interactive use with M-x. + +On platforms where symbolic links are not available, any file handlers will +be run, but the check for the existence of LINKNAME will not be done, and +the symbolic link will not be created. */ (filename, linkname, ok_if_already_exists)) { @@ -3313,21 +3352,31 @@ return Qnil; } -DEFUN ("write-region-internal", Fwrite_region_internal, 3, 7, +DEFUN ("write-region-internal", Fwrite_region_internal, 3, 8, "r\nFWrite region to file: ", /* Write current region into specified file; no coding-system frobbing. -This function is identical to `write-region' except for the handling -of the CODESYS argument under XEmacs/Mule. (When Mule support is not -present, both functions are identical and ignore the CODESYS argument.) -If support for Mule exists in this Emacs, the file is encoded according -to the value of CODESYS. If this is nil, no code conversion occurs. + +This function is almost identical to `write-region'; see that function for +documentation of the START, END, FILENAME, APPEND, VISIT, and LOCKNAME +arguments. CODESYS specifies the encoding to be used for the file; if it is +nil, no code conversion occurs. (With `write-region' the coding system is +determined automatically if not specified.) + +MUSTBENEW specifies that a check for an existing file of the same name +should be made. If it is 'excl, XEmacs will error on detecting such a file +and never write it. If it is some other non-nil value, the user will be +prompted to confirm the overwriting of an existing file. If it is nil, +existing files are silently overwritten when file system permissions allow +this. As a special kludge to support auto-saving, when START is nil START and END are set to the beginning and end, respectively, of the buffer, regardless of any restrictions. Don't use this feature. It is documented here because write-region handler writers need to be aware of it. + */ - (start, end, filename, append, visit, lockname, codesys)) + (start, end, filename, append, visit, lockname, codesys, + mustbenew)) { /* This function can call lisp. GC checked 2000-07-28 ben */ int desc; @@ -3372,6 +3421,9 @@ { Lisp_Object handler; + if (!NILP (mustbenew) && !EQ (mustbenew, Qexcl)) + barf_or_query_if_file_exists (filename, "overwrite", 1, NULL); + if (visiting_other) visit_file = Fexpand_file_name (visit, Qnil); else @@ -3433,12 +3485,14 @@ desc = -1; if (!NILP (append)) { - desc = qxe_open (XSTRING_DATA (fn), O_WRONLY | OPEN_BINARY, 0); + desc = qxe_open (XSTRING_DATA (fn), O_WRONLY | OPEN_BINARY + | (EQ (mustbenew, Qexcl) ? O_EXCL : 0), 0); } if (desc < 0) { desc = qxe_open (XSTRING_DATA (fn), - O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY, + O_WRONLY | (EQ (mustbenew, Qexcl) ? O_EXCL : O_TRUNC) + | O_CREAT | OPEN_BINARY, auto_saving ? auto_save_mode_bits : CREAT_MODE); } @@ -3519,7 +3573,7 @@ Disk full in NFS may be reported here. */ /* mib says that closing the file will try to write as fast as NFS can do it, and that means the fsync here is not crucial for autosave files. */ - if (!auto_saving && fsync (desc) < 0 + if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0 /* If fsync fails with EINTR, don't treat that as serious. */ && errno != EINTR) { @@ -4007,11 +4061,11 @@ Fwrite_region_internal (Qnil, Qnil, a, Qnil, Qlambda, Qnil, #if 1 /* #### Kyle wants it changed to not use escape-quoted. Think carefully about how this works. */ - Qescape_quoted + Qescape_quoted, #else - current_buffer->buffer_file_coding_system + current_buffer->buffer_file_coding_system, #endif - ); + Qnil); } static Lisp_Object @@ -4367,6 +4421,7 @@ DEFSYMBOL (Qverify_visited_file_modtime); DEFSYMBOL (Qset_visited_file_modtime); DEFSYMBOL (Qcar_less_than_car); /* Vomitous! */ + DEFSYMBOL (Qexcl); DEFSYMBOL (Qauto_save_hook); DEFSYMBOL (Qauto_save_error); @@ -4510,6 +4565,15 @@ */ ); Vauto_save_list_file_name = Qnil; +#ifdef HAVE_FSYNC + DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync /* +*Non-nil means don't call fsync in `write-region'. +This variable affects calls to `write-region' as well as save commands. +A non-nil value may result in data loss! +*/ ); + write_region_inhibit_fsync = 0; +#endif + DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix /* Prefix for generating auto-save-list-file-name. Emacs's pid and the system name will be appended to diff -r 71bf2c5667ba -r 66411359ce4e src/font-mgr.c --- a/src/font-mgr.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/font-mgr.c Sat Oct 25 21:40:46 2008 +0900 @@ -898,10 +898,8 @@ intern ("fc-config-get-blanks")); } -/* The misspelling in the fontconfig function name accurately corresponds to - the version of fontconfig.h I had on 2007-04-13. -- sjt */ DEFUN("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0, /* - -- Function: int FcConfigGetRescanInverval (FcConfig *config) + -- Function: int FcConfigGetRescanInterval (FcConfig *config) Returns the interval between automatic checks of the configuration (in seconds) specified in 'config'. The configuration is checked during a call to FcFontList when this interval has passed since @@ -909,13 +907,11 @@ (config)) { CHECK_FCCONFIG (config); - return make_int (FcConfigGetRescanInverval (XFCCONFIG_PTR (config))); + return make_int (FcConfigGetRescanInterval (XFCCONFIG_PTR (config))); } -/* The misspelling in the fontconfig function name accurately corresponds to - the version of fontconfig.h I had on 2007-04-13. -- sjt */ DEFUN("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0, /* - -- Function: FcBool FcConfigSetRescanInverval (FcConfig *config, int + -- Function: FcBool FcConfigSetRescanInterval (FcConfig *config, int rescanInterval) Sets the rescan interval; returns FcFalse if an error occurred. XEmacs: signal such error, or return nil on success. */ @@ -923,7 +919,7 @@ { CHECK_FCCONFIG (config); CHECK_INT (rescan_interval); - if (FcConfigSetRescanInverval (XFCCONFIG_PTR (config), + if (FcConfigSetRescanInterval (XFCCONFIG_PTR (config), XINT (rescan_interval)) == FcFalse) signal_error (Qio_error, "FcConfigSetRescanInverval barfed", intern ("fc-config-set-rescan-interval")); diff -r 71bf2c5667ba -r 66411359ce4e src/font-mgr.h --- a/src/font-mgr.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/font-mgr.h Sat Oct 25 21:40:46 2008 +0900 @@ -90,6 +90,17 @@ #endif /* FONTCONFIG_EXPOSE_CONFIG */ #ifdef USE_XFT + +#ifndef HAVE_FCCONFIGGETRESCANINTERVAL +/* Older fontconfig versions misspell this function name. */ +#define FcConfigGetRescanInterval FcConfigGetRescanInverval +#endif /* */ + +#ifndef HAVE_FCCONFIGSETRESCANINTERVAL +/* Older fontconfig versions misspell this function name. */ +#define FcConfigSetRescanInterval FcConfigSetRescanInverval +#endif /* */ + /* The format of a fontname (as returned by fontconfig) is not well-documented, But the character repertoire is represented in an ASCII-compatible way. See diff -r 71bf2c5667ba -r 66411359ce4e src/frame-gtk.c --- a/src/frame-gtk.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/frame-gtk.c Sat Oct 25 21:40:46 2008 +0900 @@ -1354,9 +1354,7 @@ if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f)) xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *); -#ifdef NEW_GC - mc_free (f->frame_data); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (f->frame_data, void *); #endif /* not NEW_GC */ f->frame_data = 0; diff -r 71bf2c5667ba -r 66411359ce4e src/frame-msw.c --- a/src/frame-msw.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/frame-msw.c Sat Oct 25 21:40:46 2008 +0900 @@ -304,10 +304,20 @@ static void mswindows_init_frame_3 (struct frame *f) { - /* Don't do this earlier or we get a WM_PAINT before the frame is ready */ - ShowWindow (FRAME_MSWINDOWS_HANDLE (f), SW_SHOWNORMAL); - SetForegroundWindow (FRAME_MSWINDOWS_HANDLE (f)); - DragAcceptFiles (FRAME_MSWINDOWS_HANDLE (f), TRUE); + /* Don't do this earlier or we get a WM_PAINT before the frame is ready. */ + ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL); +#ifdef CYGWIN + /* The SW_x parameter in the first call that an app makes to ShowWindow is + * ignored, and the parameter specified in the caller's STARTUPINFO is + * substituted instead. That parameter is SW_HIDE if we were started by + * runemacs, so call this twice. #### runemacs is evil. To see why this + * second call was restored, see the threads referenced by + * 20a807210611011157j57ea2b22ue892f4dfcb6aade8@mail.gmail.com and + * 20a807210708181345m7ac94ff2m43337be71e853d95@mail.gmail.com . */ + ShowWindow (FRAME_MSWINDOWS_HANDLE(f), SW_SHOWNORMAL); +#endif + SetForegroundWindow (FRAME_MSWINDOWS_HANDLE(f)); + DragAcceptFiles (FRAME_MSWINDOWS_HANDLE(f), TRUE); } static void @@ -353,9 +363,7 @@ #endif ReleaseDC (FRAME_MSWINDOWS_HANDLE (f), FRAME_MSWINDOWS_DC (f)); DestroyWindow (FRAME_MSWINDOWS_HANDLE (f)); -#ifdef NEW_GC - mc_free (f->frame_data); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (f->frame_data, void *); #endif /* not NEW_GC */ } diff -r 71bf2c5667ba -r 66411359ce4e src/frame-tty.c --- a/src/frame-tty.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/frame-tty.c Sat Oct 25 21:40:46 2008 +0900 @@ -37,7 +37,7 @@ /* Default properties to use when creating frames. */ Lisp_Object Vdefault_tty_frame_plist; -Lisp_Object Qframe_number; +Lisp_Object Qframe_number, Qmake_frame_after_init_entry_point; static void tty_raise_frame (struct frame *); @@ -83,7 +83,7 @@ int first_on_console) { if (first_on_console) - call1 (Qinit_post_tty_win, FRAME_CONSOLE (f)); + call1 (Qmake_frame_after_init_entry_point, FRAME_CONSOLE (f)); } /* Change from withdrawn state to mapped state. */ @@ -235,6 +235,7 @@ syms_of_frame_tty (void) { DEFSYMBOL (Qframe_number); + DEFSYMBOL (Qmake_frame_after_init_entry_point); } void diff -r 71bf2c5667ba -r 66411359ce4e src/frame-x.c --- a/src/frame-x.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/frame-x.c Sat Oct 25 21:40:46 2008 +0900 @@ -2686,9 +2686,7 @@ if (f->frame_data) { -#ifdef NEW_GC - mc_free (f->frame_data); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (f->frame_data, void *); #endif /* not NEW_GC */ f->frame_data = 0; diff -r 71bf2c5667ba -r 66411359ce4e src/frame.c --- a/src/frame.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/frame.c Sat Oct 25 21:40:46 2008 +0900 @@ -180,10 +180,10 @@ { XD_END } }; -DEFINE_LRECORD_IMPLEMENTATION ("expose-ignore", +DEFINE_LRECORD_IMPLEMENTATION ("expose-ignore", expose_ignore, 1, /*dumpable-flag*/ - 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, expose_ignore_description_1, struct expose_ignore); #else /* not NEW_GC */ @@ -239,7 +239,7 @@ { XD_BLOCK_PTR, offsetof (struct frame, framemeths), 1, { &console_methods_description } }, - { XD_UNION, offsetof (struct frame, frame_data), + { XD_UNION, offsetof (struct frame, frame_data), XD_INDIRECT (0, 0), { &frame_data_description } }, { XD_END } }; @@ -285,7 +285,7 @@ DEFINE_LRECORD_IMPLEMENTATION ("frame", frame, 0, /*dumpable-flag*/ - mark_frame, print_frame, 0, 0, 0, + mark_frame, print_frame, 0, 0, 0, frame_description, struct frame); @@ -478,7 +478,7 @@ if (!EQ (lissed, Qunbound)) DEVICE_FRAME_LIST (XDEVICE (XCAR (kawnz))) = lissed; return Qnil; -} +} DEFUN ("make-frame", Fmake_frame, 0, 2, "", /* Create and return a new frame, displaying the current buffer. @@ -532,15 +532,15 @@ in the dumped executable, and we can choose it at runtime. */ name = build_string("XEmacs"); } - else if (NILP (Vdefault_frame_name)) - { + else if (NILP (Vdefault_frame_name)) + { if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS")) { - Vdefault_frame_name = build_string ("emacs"); + Vdefault_frame_name = build_string ("emacs"); } - else + else { - Vdefault_frame_name = build_string ("XEmacs"); + Vdefault_frame_name = build_string ("XEmacs"); } } @@ -589,7 +589,7 @@ if (initialized && !DEVICE_STREAM_P (d)) { if (!NILP (f->minibuffer_window)) - reset_face_cachels (XWINDOW (f->minibuffer_window)); + reset_face_cachels (XWINDOW (f->minibuffer_window)); reset_face_cachels (XWINDOW (f->root_window)); } @@ -685,10 +685,10 @@ 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. */ + 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); @@ -1330,7 +1330,7 @@ `visible' Consider only frames that are visible. `iconic' Consider only frames that are iconic. `invisible' Consider only frames that are invisible - (this is different from iconic). + (this is different from iconic). `visible-iconic' Consider frames that are visible or iconic. `invisible-iconic' Consider frames that are invisible or iconic. `nomini' Consider all frames except minibuffer-only ones. @@ -1338,9 +1338,9 @@ `iconic-nomini' Like `iconic' but omits minibuffer-only frames. `invisible-nomini' Like `invisible' but omits minibuffer-only frames. `visible-iconic-nomini' Like `visible-iconic' but omits minibuffer-only - frames. + frames. `invisible-iconic-nomini' Like `invisible-iconic' but omits minibuffer-only - frames. + frames. any other value Consider all frames. If WHICH-FRAMES is omitted, `nomini' is used. A value for WHICH-FRAMES @@ -1608,7 +1608,7 @@ /* If this is a popup frame, select its parent if possible. Otherwise, find another visible frame; if none, just take any frame. - First try the same device, then the same console. */ + First try the same device, then the same console. */ next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil); if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next))) @@ -2517,10 +2517,10 @@ frame after it has been created, because the old name was used for resource lookup. */ if (EQ (prop, Qname)) - { - CHECK_STRING (val); - f->name = val; - } + { + CHECK_STRING (val); + f->name = val; + } #endif /* 0 */ if (EQ (prop, Qminibuffer)) store_minibuf_frame_prop (f, val); @@ -2737,14 +2737,14 @@ int height, pheight; frame = wrap_frame (f); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { height = FRAME_HEIGHT (f); frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, 0, &pheight, 0, &height, 0); } - else + else pheight = FRAME_PIXHEIGHT (f); return make_int (pheight); @@ -2767,14 +2767,14 @@ int width, pwidth; frame = wrap_frame (f); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { width = FRAME_WIDTH (f); frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, &pwidth, 0, &width, 0, 0); } - else + else pwidth = FRAME_PIXWIDTH (f); return make_int (pwidth); @@ -2857,14 +2857,14 @@ frame = wrap_frame (f); CHECK_INT (height); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { int h = XINT (height); width = FRAME_WIDTH (f); frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); } - else + else { width = FRAME_PIXWIDTH (f); pheight = XINT (height); @@ -2887,13 +2887,13 @@ frame = wrap_frame (f); CHECK_INT (height); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { int h = XINT (height); width = FRAME_WIDTH (f); frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); } - else + else { width = FRAME_PIXWIDTH (f); pheight = XINT (height); @@ -3030,7 +3030,7 @@ CHECK_INT (width); CHECK_INT (height); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { int w = XINT (width); int h = XINT (height); @@ -3060,7 +3060,7 @@ CHECK_INT (width); CHECK_INT (height); - if (!window_system_pixelated_geometry (frame)) + if (!window_system_pixelated_geometry (frame)) { int w = XINT (width); int h = XINT (height); @@ -3273,6 +3273,7 @@ default_face_height_and_width_1 (frame, &font_height, &font_width); /* This size-change overrides any pending one for this frame. */ + f->size_change_pending = 0; FRAME_NEW_HEIGHT (f) = 0; FRAME_NEW_WIDTH (f) = 0; @@ -3337,7 +3338,7 @@ if (new_pixheight) { /* Adjust for gutters here so that we always get set - properly. */ + properly. */ new_pixheight -= (FRAME_TOP_GUTTER_BOUNDS (f) + FRAME_BOTTOM_GUTTER_BOUNDS (f)); @@ -3388,7 +3389,7 @@ if (new_pixwidth) { /* Adjust for gutters here so that we always get set - properly. */ + properly. */ new_pixwidth -= (FRAME_LEFT_GUTTER_BOUNDS (f) + FRAME_RIGHT_GUTTER_BOUNDS (f)); @@ -3450,7 +3451,6 @@ return; } - f->size_change_pending = 0; /* For TTY frames, it's like one, like all ... Can't have two TTY frames of different sizes on the same device. */ if (FRAME_TTY_P (f)) @@ -3479,7 +3479,7 @@ Dynarr_reset (db->runes); generate_formatted_string_db (format_str, Qnil, w, dl, db, findex, 0, - -1, type); + -1, type); Dynarr_reset (title_string_ichar_dynarr); while (elt < Dynarr_length (db->runes)) @@ -3605,7 +3605,7 @@ #endif { title_string_ichar_dynarr = Dynarr_new (Ichar); - xzero (title_string_display_line); + DISPLAY_LINE_INIT (title_string_display_line); } } diff -r 71bf2c5667ba -r 66411359ce4e src/free-hook.c --- a/src/free-hook.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/free-hook.c Sat Oct 25 21:40:46 2008 +0900 @@ -179,6 +179,8 @@ / sizeof (long); unsigned long i; + /* Not using the DEADBEEF_CONSTANT #define, since we don't know + * that allocation sizes will be multiples of eight. */ for (i = 0; i < long_length; i++) ((unsigned long *) ptr)[i] = 0xdeadbeef; } diff -r 71bf2c5667ba -r 66411359ce4e src/gc.c --- a/src/gc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/gc.c Sat Oct 25 21:40:46 2008 +0900 @@ -107,10 +107,10 @@ }; #ifndef ERROR_CHECK_GC -struct +typedef struct gc_state_type { enum gc_phase phase; -} gc_state; +} gc_state_type; #else /* ERROR_CHECK_GC */ enum gc_stat_id { @@ -122,7 +122,7 @@ GC_STAT_COUNT /* has to be last */ }; -struct +typedef struct gc_state_type { enum gc_phase phase; double n_gc[GC_STAT_COUNT]; @@ -134,9 +134,11 @@ double dequeued2[GC_STAT_COUNT]; double finalized[GC_STAT_COUNT]; double freed[GC_STAT_COUNT]; -} gc_state; +} gc_state_type; #endif /* ERROR_CHECK_GC */ +gc_state_type gc_state; + #define GC_PHASE gc_state.phase #define GC_SET_PHASE(p) GC_PHASE = p @@ -314,12 +316,12 @@ (consing_since_gc > gc_cons_threshold && #if 0 /* #### implement this better */ - (100 * consing_since_gc) / total_data_usage () >= - gc_cons_percentage + ((double)consing_since_gc) / total_data_usage()) >= + ((double)gc_cons_percentage / 100) #else (!total_gc_usage_set || - (100 * consing_since_gc) / total_gc_usage >= - gc_cons_percentage) + ((double)consing_since_gc / total_gc_usage) >= + ((double)gc_cons_percentage / 100)) #endif ); recompute_funcall_allocation_flag (); @@ -2164,7 +2166,7 @@ */ ); DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages /* - Non-nil means display messages at start and end of garbage collection. +*Non-nil means display messages at start and end of garbage collection. */ ); garbage_collection_messages = 0; diff -r 71bf2c5667ba -r 66411359ce4e src/glyphs-eimage.c --- a/src/glyphs-eimage.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/glyphs-eimage.c Sat Oct 25 21:40:46 2008 +0900 @@ -109,6 +109,14 @@ #define XMD_H typedef signed int INT32; typedef signed short INT16; + +/* And another one... jmorecfg.h defines the 'boolean' type as int, + which conflicts with the standard Windows 'boolean' definition as + unsigned char. Ref: http://www.asmail.be/msg0054688232.html */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ #endif #include diff -r 71bf2c5667ba -r 66411359ce4e src/glyphs-gtk.c --- a/src/glyphs-gtk.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/glyphs-gtk.c Sat Oct 25 21:40:46 2008 +0900 @@ -162,7 +162,7 @@ /************************************************************************/ /* convert from a series of RGB triples to an XImage formated for the */ -/* proper display */ +/* proper display */ /************************************************************************/ static GdkImage * convert_EImage_to_GDKImage (Lisp_Object device, int width, int height, @@ -215,7 +215,7 @@ gdk_image_destroy (outimg); return NULL; } - + if (vis->type == GDK_VISUAL_PSEUDO_COLOR) { unsigned long pixarray[256]; @@ -231,7 +231,7 @@ { GdkColor color; int res; - + color.red = qtable->rm[i] ? qtable->rm[i] << 8 : 0; color.green = qtable->gm[i] ? qtable->gm[i] << 8 : 0; color.blue = qtable->bm[i] ? qtable->bm[i] << 8 : 0; @@ -343,7 +343,7 @@ #endif } } - } + } return outimg; } @@ -796,7 +796,7 @@ find_keyword_in_vector (instantiator, Q_file); IMAGE_INSTANCE_GTK_PIXMAP (ii) = pixmap; - IMAGE_INSTANCE_GTK_MASK (ii) = 0; + IMAGE_INSTANCE_PIXMAP_MASK (ii) = 0; IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = gdk_image->width; IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = gdk_image->height; IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = gdk_image->depth; @@ -885,7 +885,7 @@ gtk_init_image_instance_from_eimage (struct Lisp_Image_Instance *ii, int width, int height, int slices, - unsigned char *eimage, + unsigned char *eimage, int dest_mask, Lisp_Object instantiator, Lisp_Object pointer_fg, @@ -1168,13 +1168,13 @@ Fmake_color_instance (value, device, encode_error_behavior_flag (ERROR_ME_DEBUG_WARN)); else - { - assert (COLOR_SPECIFIERP (value)); - value = Fspecifier_instance (value, domain, Qnil, Qnil); - } + { + assert (COLOR_SPECIFIERP (value)); + value = Fspecifier_instance (value, domain, Qnil, Qnil); + } if (NILP (value)) - continue; + continue; results = noseeum_cons (noseeum_cons (name, value), results); i++; } @@ -1188,7 +1188,7 @@ for (j=0; j= 1; len -= 2) { /* Keyword comparisons can be done with eq, the value must be - done with equal. - #### Note that this does not optimize re-ordering. */ + done with equal. + #### Note that this does not optimize re-ordering. */ if (!EQ (elt[len], old_elt[len]) || !internal_equal (elt[len+1], old_elt[len+1], 0)) alist = Fcons (Fcons (elt[len], elt[len+1]), alist); @@ -913,7 +914,7 @@ { XD_LISP_OBJECT, offsetof (Lisp_Image_Instance, name) }, { XD_LISP_OBJECT, offsetof (Lisp_Image_Instance, parent) }, { XD_LISP_OBJECT, offsetof (Lisp_Image_Instance, instantiator) }, - { XD_UNION, offsetof (struct Lisp_Image_Instance, u), + { XD_UNION, offsetof (struct Lisp_Image_Instance, u), XD_INDIRECT (0, 0), { &image_instance_data_description } }, { XD_END } }; @@ -992,7 +993,7 @@ if (print_readably) printing_unreadable_object ("#", - ii->header.uid); + ii->header.uid); write_fmt_string_lisp (printcharfun, "#name)) @@ -1094,7 +1095,7 @@ write_c_string (printcharfun, "dead"); else write_c_string (printcharfun, - DEVICE_TYPE_NAME (XDEVICE (FRAME_DEVICE (f)))); + DEVICE_TYPE_NAME (XDEVICE (FRAME_DEVICE (f)))); } write_c_string (printcharfun, "-frame>"); write_fmt_string (printcharfun, " 0x%p", @@ -1292,7 +1293,7 @@ case IMAGE_WIDGET: /* We need the hash to be equivalent to what should be - displayed. */ + displayed. */ hash = HASH5 (hash, LISP_HASH (IMAGE_INSTANCE_WIDGET_TYPE (i)), internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1), @@ -2235,7 +2236,7 @@ Lisp_Object data) { signal_error_1 (Qimage_conversion_error, - list3 (build_msg_string (string1), + list3 (build_msg_string (string1), build_msg_string (string2), data)); } @@ -2245,7 +2246,7 @@ Lisp_Object data1, Lisp_Object data2) { signal_error_1 (Qimage_conversion_error, - list4 (build_msg_string (string1), + list4 (build_msg_string (string1), build_msg_string (string2), data1, data2)); } @@ -2529,9 +2530,10 @@ /* pixmap file functions */ /************************************************************************/ -/* If INSTANTIATOR refers to inline data, return Qnil. +/* If INSTANTIATOR refers to inline data, return Qt. If INSTANTIATOR refers to data in a file, return the full filename - if it exists; otherwise, return a cons of (filename). + if it exists, Qnil if there's no console method for locating the file, or + (filename) if there was an error locating the file. FILE_KEYWORD and DATA_KEYWORD are symbols specifying the keywords used to look up the file and inline data, @@ -2554,17 +2556,24 @@ if (!NILP (file) && NILP (data)) { - Lisp_Object retval = MAYBE_LISP_CONTYPE_METH - (decode_console_type(console_type, ERROR_ME), - locate_pixmap_file, (file)); - - if (!NILP (retval)) - return retval; - else - return Fcons (file, Qnil); /* should have been file */ + struct console_methods *meths + = decode_console_type(console_type, ERROR_ME); + + if (HAS_CONTYPE_METH_P (meths, locate_pixmap_file)) + { + Lisp_Object retval + = CONTYPE_METH (meths, locate_pixmap_file, (file)); + + if (!NILP (retval)) + return retval; + else + return Fcons (file, Qnil); /* should have been file */ + } + else /* method unavailable */ + return Qnil; } - return Qnil; + return Qt; } Lisp_Object @@ -2589,12 +2598,15 @@ file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, console_type); + if (NILP (file)) /* normalization impossible for the console type */ + RETURN_UNGCPRO (Qnil); + if (CONSP (file)) /* failure locating filename */ signal_double_image_error ("Opening pixmap file", "no such file or directory", Fcar (file)); - if (NILP (file)) /* no conversion necessary */ + if (EQ (file, Qt)) /* no conversion necessary */ RETURN_UNGCPRO (inst); alist = tagged_vector_to_alist (inst); @@ -2740,10 +2752,10 @@ /* This is unclean but it's fairly standard -- a number of the bitmaps in /usr/include/X11/bitmaps use it -- so we support it. */ - if (NILP (mask_file) + if (EQ (mask_file, Qt) /* don't override explicitly specified mask data. */ && NILP (assq_no_quit (Q_mask_data, alist)) - && !NILP (file)) + && !EQ (file, Qt)) { mask_file = MAYBE_LISP_CONTYPE_METH (decode_console_type(console_type, ERROR_ME), @@ -2793,17 +2805,20 @@ mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, Q_mask_data, console_type); + if (NILP (file)) /* normalization impossible for the console type */ + RETURN_UNGCPRO (Qnil); + if (CONSP (file)) /* failure locating filename */ signal_double_image_error ("Opening bitmap file", "no such file or directory", Fcar (file)); - if (NILP (file) && NILP (mask_file)) /* no conversion necessary */ + if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */ RETURN_UNGCPRO (inst); alist = tagged_vector_to_alist (inst); - if (!NILP (file)) + if (!EQ (file, Qt)) { int xhot, yhot; Lisp_Object data = bitmap_to_lisp_data (file, &xhot, &yhot, 0); @@ -2878,17 +2893,22 @@ mask_file = potential_pixmap_file_instantiator (inst, Q_mask_file, Q_mask_data, console_type); + if (NILP (file)) /* normalization impossible for the console type */ + RETURN_UNGCPRO (Qnil); + if (CONSP (file)) /* failure locating filename */ signal_double_image_error ("Opening bitmap file", "no such file or directory", Fcar (file)); - if (NILP (file) && NILP (mask_file)) /* no conversion necessary */ + if (EQ (file, Qt) && EQ (mask_file, Qt)) /* no conversion necessary */ RETURN_UNGCPRO (inst); alist = tagged_vector_to_alist (inst); { + /* #### FIXME: what if EQ (file, Qt) && !EQ (mask, Qt) ? Is that possible? + If so, we have a problem... -- dvl */ Lisp_Object data = make_string_from_file (file); alist = remassq_no_quit (Q_file, alist); /* there can't be a :data at this point. */ @@ -3094,6 +3114,9 @@ file = potential_pixmap_file_instantiator (inst, Q_file, Q_data, console_type); + if (NILP (file)) /* normalization impossible for the console type */ + RETURN_UNGCPRO (Qnil); + if (CONSP (file)) /* failure locating filename */ signal_double_image_error ("Opening pixmap file", "no such file or directory", @@ -3102,13 +3125,13 @@ color_symbols = find_keyword_in_vector_or_given (inst, Q_color_symbols, Qunbound); - if (NILP (file) && !UNBOUNDP (color_symbols)) + if (EQ (file, Qt) && !UNBOUNDP (color_symbols)) /* no conversion necessary */ RETURN_UNGCPRO (inst); alist = tagged_vector_to_alist (inst); - if (!NILP (file)) + if (!NILP (file) && !EQ (file, Qt)) { Lisp_Object data = pixmap_to_lisp_data (file, 0); alist = remassq_no_quit (Q_file, alist); @@ -3236,7 +3259,7 @@ static Lisp_Object image_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec), Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth) + Lisp_Object depth, int no_fallback) { Lisp_Object glyph = IMAGE_SPECIFIER_ATTACHEE (XIMAGE_SPECIFIER (specifier)); int dest_mask = XIMAGE_SPECIFIER_ALLOWED (specifier); @@ -3275,7 +3298,7 @@ assert (XVECTOR_LENGTH (instantiator) == 3); return (FACE_PROPERTY_INSTANCE (Fget_face (XVECTOR_DATA (instantiator)[2]), - Qbackground_pixmap, domain, 1, depth)); + Qbackground_pixmap, domain, no_fallback, depth)); } else { @@ -3359,7 +3382,7 @@ ABORT (); /* We're not allowed anything else currently. */ /* If we don't have an instance at this point then create - one. */ + one. */ if (UNBOUNDP (instance)) { Lisp_Object locative = @@ -3406,12 +3429,12 @@ else if (NILP (instance)) gui_error ("Can't instantiate image (probably cached)", instantiator); /* We found an instance. However, because we are using the glyph - as the hash key instead of the instantiator, the current - instantiator may not be the same as the original. Thus we - must update the instance based on the new - instantiator. Preserving instance identity like this is - important to stop excessive window system widget creation and - deletion - and hence flashing. */ + as the hash key instead of the instantiator, the current + instantiator may not be the same as the original. Thus we + must update the instance based on the new + instantiator. Preserving instance identity like this is + important to stop excessive window system widget creation and + deletion - and hence flashing. */ else { /* #### This function should be able to cope with *all* @@ -4261,7 +4284,7 @@ /***************************************************************************** - * glyph cachel functions * + * glyph cachel functions * *****************************************************************************/ /* #### All of this is 95% copied from face cachels. Consider @@ -4434,7 +4457,7 @@ /***************************************************************************** - * subwindow cachel functions * + * subwindow cachel functions * *****************************************************************************/ /* Subwindows are curious in that you have to physically unmap them to not display them. It is problematic deciding what to do in @@ -4576,9 +4599,7 @@ if (ei == f->subwindow_exposures_tail) f->subwindow_exposures_tail = prev; -#ifdef NEW_GC - mc_free (ei); -#else /* not NEW_GC */ +#ifndef NEW_GC Blocktype_free (the_expose_ignore_blocktype, ei); #endif /* not NEW_GC */ return 1; @@ -4804,7 +4825,7 @@ register_ignored_expose (f, IMAGE_INSTANCE_DISPLAY_X (ii), IMAGE_INSTANCE_DISPLAY_Y (ii), IMAGE_INSTANCE_DISPLAY_WIDTH (ii), - IMAGE_INSTANCE_DISPLAY_HEIGHT (ii)); + IMAGE_INSTANCE_DISPLAY_HEIGHT (ii)); IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)), @@ -5080,7 +5101,7 @@ { /* Increment the index of the image slice we are currently viewing. */ - IMAGE_INSTANCE_PIXMAP_SLICE (ii) = + IMAGE_INSTANCE_PIXMAP_SLICE (ii) = (IMAGE_INSTANCE_PIXMAP_SLICE (ii) + 1) % IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii); /* We might need to kick redisplay at this point - but we diff -r 71bf2c5667ba -r 66411359ce4e src/gutter.c --- a/src/gutter.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/gutter.c Sat Oct 25 21:40:46 2008 +0900 @@ -272,7 +272,7 @@ for (rest = gutter; !NILP (rest); rest = XCDR (XCDR (rest))) { /* We only put things in the real gutter that are declared to be - visible. */ + visible. */ if (!CONSP (WINDOW_GUTTER_VISIBLE (w, pos)) || !NILP (Fmemq (XCAR (rest), WINDOW_GUTTER_VISIBLE (w, pos)))) @@ -301,7 +301,7 @@ if (Dynarr_length (ddla)) { dl = Dynarr_atp (ddla, Dynarr_length (ddla) - 1); - size = (dl->ypos + dl->descent - dl->clip) + size = (dl->ypos + dl->descent - dl->clip) - (Dynarr_atp (ddla, 0)->ypos - Dynarr_atp (ddla, 0)->ascent); } } @@ -365,7 +365,7 @@ - FRAME_LEFT_BORDER_END (f), FRAME_BOTTOM_BORDER_START (f) - FRAME_TOP_BORDER_END (f), - ddla, 0, 0); + ddla, 0, DEFAULT_INDEX); /* Let GC happen again. */ exit_redisplay_critical_section (count); @@ -424,7 +424,7 @@ (f->extents_changed && w->gutter_extent_modiff[pos])) { #ifdef DEBUG_GUTTERS - stderr_out ("gutter redisplay [%s %dx%d@%d+%d] triggered by %s,\n", + stderr_out ("gutter redisplay [%s %dx%d@%d+%d] triggered by %s,\n", pos == TOP_GUTTER ? "TOP" : pos == BOTTOM_GUTTER ? "BOTTOM" : pos == LEFT_GUTTER ? "LEFT" : "RIGHT", @@ -465,12 +465,12 @@ redisplay_clear_region (window, findex, x + border_width , ypos, width - 2 * border_width, height - (ypos - y) - border_width); /* If, for some reason, we have more to display than we have - room for, and we are allowed to resize the gutter, then make - sure this happens before the next time we try and - output. This can happen when face font sizes change. */ - if (dl && EQ (w->gutter_size[pos], Qautodetect) + room for, and we are allowed to resize the gutter, then make + sure this happens before the next time we try and + output. This can happen when face font sizes change. */ + if (dl && EQ (w->gutter_size[pos], Qautodetect) && (dl->clip > 0 || - calculate_gutter_size_from_display_lines (pos, ddla) > + calculate_gutter_size_from_display_lines (pos, ddla) > WINDOW_GUTTER_SIZE_INTERNAL (w, pos))) { /* #### Ideally we would just mark the specifier as dirty @@ -500,7 +500,7 @@ else { /* Nothing of significance happened so sync the display line - structs. */ + structs. */ for (line = 0; line < Dynarr_length (ddla); line++) { sync_display_line_structs (w, line, 1, cdla, ddla); @@ -542,7 +542,7 @@ if (f->current_display_lines[pos]) mark_redisplay_structs (f->current_display_lines[pos]); /* [[#### Do we really need to mark the desired lines?]] - ALWAYS mark everything. --ben */ + ALWAYS mark everything. --ben */ if (f->desired_display_lines[pos]) mark_redisplay_structs (f->desired_display_lines[pos]); } @@ -602,16 +602,16 @@ void update_frame_gutter_geometry (struct frame *f) { - if (f->gutter_changed - || f->frame_layout_changed + if (f->gutter_changed + || f->frame_layout_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. */ + frame. If we are in display there is almost no point in doing + anything else since the frame size changes will be delayed + until we are out of redisplay proper. */ GUTTER_POS_LOOP (pos) { update_gutter_geometry (f, pos); @@ -631,7 +631,7 @@ enum gutter_pos pos; /* We don't actually care about these when outputting the gutter - so locally disable them. */ + so locally disable them. */ int local_clip_changed = f->clip_changed; int local_buffers_changed = f->buffers_changed; f->clip_changed = 0; @@ -1129,7 +1129,7 @@ int depth; /* We have to be "in display" when we output the gutter - - make it so. */ + - make it so. */ depth = enter_redisplay_critical_section (); update_frame_gutters (f); exit_redisplay_critical_section (depth); diff -r 71bf2c5667ba -r 66411359ce4e src/input-method-xlib.c --- a/src/input-method-xlib.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/input-method-xlib.c Sat Oct 25 21:40:46 2008 +0900 @@ -713,7 +713,7 @@ if (converter_data) { - Boolean free_p = (Boolean) (int) converter_data; + Boolean free_p = (Boolean) (EMACS_INT) converter_data; XIMStyles *styles = (XIMStyles *) toVal->addr; if (free_p) XFree ( styles->supported_styles ); diff -r 71bf2c5667ba -r 66411359ce4e src/keymap.c --- a/src/keymap.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/keymap.c Sat Oct 25 21:40:46 2008 +0900 @@ -217,10 +217,20 @@ static Lisp_Object keymap_submaps (Lisp_Object keymap); Lisp_Object Qcontrol, Qctrl, Qmeta, Qsuper, Qhyper, Qalt, Qshift; -Lisp_Object Qbutton0, Qbutton1, Qbutton2, Qbutton3; -Lisp_Object Qbutton4, Qbutton5, Qbutton6, Qbutton7; -Lisp_Object Qbutton0up, Qbutton1up, Qbutton2up, Qbutton3up; -Lisp_Object Qbutton4up, Qbutton5up, Qbutton6up, Qbutton7up; +Lisp_Object Qbutton0; +Lisp_Object Qbutton1, Qbutton2, Qbutton3, Qbutton4, Qbutton5; +Lisp_Object Qbutton6, Qbutton7, Qbutton8, Qbutton9, Qbutton10; +Lisp_Object Qbutton11, Qbutton12, Qbutton13, Qbutton14, Qbutton15; +Lisp_Object Qbutton16, Qbutton17, Qbutton18, Qbutton19, Qbutton20; +Lisp_Object Qbutton21, Qbutton22, Qbutton23, Qbutton24, Qbutton25; +Lisp_Object Qbutton26; +Lisp_Object Qbutton0up; +Lisp_Object Qbutton1up, Qbutton2up, Qbutton3up, Qbutton4up, Qbutton5up; +Lisp_Object Qbutton6up, Qbutton7up, Qbutton8up, Qbutton9up, Qbutton10up; +Lisp_Object Qbutton11up, Qbutton12up, Qbutton13up, Qbutton14up, Qbutton15up; +Lisp_Object Qbutton16up, Qbutton17up, Qbutton18up, Qbutton19up, Qbutton20up; +Lisp_Object Qbutton21up, Qbutton22up, Qbutton23up, Qbutton24up, Qbutton25up; +Lisp_Object Qbutton26up; Lisp_Object Qmenu_selection; /* Emacs compatibility */ @@ -231,6 +241,25 @@ Lisp_Object Qdown_mouse_5, Qmouse_5; Lisp_Object Qdown_mouse_6, Qmouse_6; Lisp_Object Qdown_mouse_7, Qmouse_7; +Lisp_Object Qdown_mouse_8, Qmouse_8; +Lisp_Object Qdown_mouse_9, Qmouse_9; +Lisp_Object Qdown_mouse_10, Qmouse_10; +Lisp_Object Qdown_mouse_11, Qmouse_11; +Lisp_Object Qdown_mouse_12, Qmouse_12; +Lisp_Object Qdown_mouse_13, Qmouse_13; +Lisp_Object Qdown_mouse_14, Qmouse_14; +Lisp_Object Qdown_mouse_15, Qmouse_15; +Lisp_Object Qdown_mouse_16, Qmouse_16; +Lisp_Object Qdown_mouse_17, Qmouse_17; +Lisp_Object Qdown_mouse_18, Qmouse_18; +Lisp_Object Qdown_mouse_19, Qmouse_19; +Lisp_Object Qdown_mouse_20, Qmouse_20; +Lisp_Object Qdown_mouse_21, Qmouse_21; +Lisp_Object Qdown_mouse_22, Qmouse_22; +Lisp_Object Qdown_mouse_23, Qmouse_23; +Lisp_Object Qdown_mouse_24, Qmouse_24; +Lisp_Object Qdown_mouse_25, Qmouse_25; +Lisp_Object Qdown_mouse_26, Qmouse_26; /* Kludge kludge kludge */ Lisp_Object QLFD, QTAB, QRET, QESC, QDEL, QSPC, QBS; @@ -468,7 +497,14 @@ Lisp_Keymap *k; modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3 - | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5); + | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5 | XEMACS_MOD_BUTTON6 + | XEMACS_MOD_BUTTON7 | XEMACS_MOD_BUTTON8 | XEMACS_MOD_BUTTON9 + | XEMACS_MOD_BUTTON10 | XEMACS_MOD_BUTTON11 | XEMACS_MOD_BUTTON12 + | XEMACS_MOD_BUTTON13 | XEMACS_MOD_BUTTON14 | XEMACS_MOD_BUTTON15 + | XEMACS_MOD_BUTTON16 | XEMACS_MOD_BUTTON17 | XEMACS_MOD_BUTTON18 + | XEMACS_MOD_BUTTON19 | XEMACS_MOD_BUTTON20 | XEMACS_MOD_BUTTON21 + | XEMACS_MOD_BUTTON22 | XEMACS_MOD_BUTTON23 | XEMACS_MOD_BUTTON24 + | XEMACS_MOD_BUTTON25 | XEMACS_MOD_BUTTON26); if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0) @@ -649,7 +685,14 @@ Lisp_Keymap *k = XKEYMAP (keymap); modifiers &= ~(XEMACS_MOD_BUTTON1 | XEMACS_MOD_BUTTON2 | XEMACS_MOD_BUTTON3 - | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5); + | XEMACS_MOD_BUTTON4 | XEMACS_MOD_BUTTON5 | XEMACS_MOD_BUTTON6 + | XEMACS_MOD_BUTTON7 | XEMACS_MOD_BUTTON8 | XEMACS_MOD_BUTTON9 + | XEMACS_MOD_BUTTON10 | XEMACS_MOD_BUTTON11 | XEMACS_MOD_BUTTON12 + | XEMACS_MOD_BUTTON13 | XEMACS_MOD_BUTTON14 | XEMACS_MOD_BUTTON15 + | XEMACS_MOD_BUTTON16 | XEMACS_MOD_BUTTON17 | XEMACS_MOD_BUTTON18 + | XEMACS_MOD_BUTTON19 | XEMACS_MOD_BUTTON20 | XEMACS_MOD_BUTTON21 + | XEMACS_MOD_BUTTON22 | XEMACS_MOD_BUTTON23 | XEMACS_MOD_BUTTON24 + | XEMACS_MOD_BUTTON25 | XEMACS_MOD_BUTTON26); assert ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) == 0); @@ -1345,7 +1388,7 @@ DECLARE_EISTRING (temp); eicpy_raw (temp, name, qxestrlen (name)); eisetch_char (temp, 2, '-'); - *keysym = Fintern_soft (eimake_string (temp), Qnil); + *keysym = Fintern_soft (eimake_string (temp), Qnil, Qnil); } else if (EQ (*keysym, QLFD)) *keysym = QKlinefeed; @@ -1363,7 +1406,7 @@ *keysym = QKbackspace; /* Emacs compatibility */ else if (EQ(*keysym, Qdown_mouse_1)) - *keysym = Qbutton1; + *keysym = Qbutton1; else if (EQ(*keysym, Qdown_mouse_2)) *keysym = Qbutton2; else if (EQ(*keysym, Qdown_mouse_3)) @@ -1376,6 +1419,44 @@ *keysym = Qbutton6; else if (EQ(*keysym, Qdown_mouse_7)) *keysym = Qbutton7; + else if (EQ(*keysym, Qdown_mouse_8)) + *keysym = Qbutton8; + else if (EQ(*keysym, Qdown_mouse_9)) + *keysym = Qbutton9; + else if (EQ(*keysym, Qdown_mouse_10)) + *keysym = Qbutton10; + else if (EQ(*keysym, Qdown_mouse_11)) + *keysym = Qbutton11; + else if (EQ(*keysym, Qdown_mouse_12)) + *keysym = Qbutton12; + else if (EQ(*keysym, Qdown_mouse_13)) + *keysym = Qbutton13; + else if (EQ(*keysym, Qdown_mouse_14)) + *keysym = Qbutton14; + else if (EQ(*keysym, Qdown_mouse_15)) + *keysym = Qbutton15; + else if (EQ(*keysym, Qdown_mouse_16)) + *keysym = Qbutton16; + else if (EQ(*keysym, Qdown_mouse_17)) + *keysym = Qbutton17; + else if (EQ(*keysym, Qdown_mouse_18)) + *keysym = Qbutton18; + else if (EQ(*keysym, Qdown_mouse_19)) + *keysym = Qbutton19; + else if (EQ(*keysym, Qdown_mouse_20)) + *keysym = Qbutton20; + else if (EQ(*keysym, Qdown_mouse_21)) + *keysym = Qbutton21; + else if (EQ(*keysym, Qdown_mouse_22)) + *keysym = Qbutton22; + else if (EQ(*keysym, Qdown_mouse_23)) + *keysym = Qbutton23; + else if (EQ(*keysym, Qdown_mouse_24)) + *keysym = Qbutton24; + else if (EQ(*keysym, Qdown_mouse_25)) + *keysym = Qbutton25; + else if (EQ(*keysym, Qdown_mouse_26)) + *keysym = Qbutton26; else if (EQ(*keysym, Qmouse_1)) *keysym = Qbutton1up; else if (EQ(*keysym, Qmouse_2)) @@ -1390,6 +1471,44 @@ *keysym = Qbutton6up; else if (EQ(*keysym, Qmouse_7)) *keysym = Qbutton7up; + else if (EQ(*keysym, Qmouse_8)) + *keysym = Qbutton8up; + else if (EQ(*keysym, Qmouse_9)) + *keysym = Qbutton9up; + else if (EQ(*keysym, Qmouse_10)) + *keysym = Qbutton10up; + else if (EQ(*keysym, Qmouse_11)) + *keysym = Qbutton11up; + else if (EQ(*keysym, Qmouse_12)) + *keysym = Qbutton12up; + else if (EQ(*keysym, Qmouse_13)) + *keysym = Qbutton13up; + else if (EQ(*keysym, Qmouse_14)) + *keysym = Qbutton14up; + else if (EQ(*keysym, Qmouse_15)) + *keysym = Qbutton15up; + else if (EQ(*keysym, Qmouse_16)) + *keysym = Qbutton16up; + else if (EQ(*keysym, Qmouse_17)) + *keysym = Qbutton17up; + else if (EQ(*keysym, Qmouse_18)) + *keysym = Qbutton18up; + else if (EQ(*keysym, Qmouse_19)) + *keysym = Qbutton19up; + else if (EQ(*keysym, Qmouse_20)) + *keysym = Qbutton20up; + else if (EQ(*keysym, Qmouse_21)) + *keysym = Qbutton21up; + else if (EQ(*keysym, Qmouse_22)) + *keysym = Qbutton22up; + else if (EQ(*keysym, Qmouse_23)) + *keysym = Qbutton23up; + else if (EQ(*keysym, Qmouse_24)) + *keysym = Qbutton24up; + else if (EQ(*keysym, Qmouse_25)) + *keysym = Qbutton25up; + else if (EQ(*keysym, Qmouse_26)) + *keysym = Qbutton26up; } } @@ -1453,6 +1572,63 @@ case 7: SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton7 : Qbutton7up)); break; + case 8: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton8 : Qbutton8up)); + break; + case 9: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton9 : Qbutton9up)); + break; + case 10: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton10 : Qbutton10up)); + break; + case 11: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton11 : Qbutton11up)); + break; + case 12: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton12 : Qbutton12up)); + break; + case 13: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton13 : Qbutton13up)); + break; + case 14: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton14 : Qbutton14up)); + break; + case 15: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton15 : Qbutton15up)); + break; + case 16: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton16 : Qbutton16up)); + break; + case 17: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton17 : Qbutton17up)); + break; + case 18: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton18 : Qbutton18up)); + break; + case 19: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton19 : Qbutton19up)); + break; + case 20: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton20 : Qbutton20up)); + break; + case 21: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton21 : Qbutton21up)); + break; + case 22: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton22 : Qbutton22up)); + break; + case 23: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton23 : Qbutton23up)); + break; + case 24: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton24 : Qbutton24up)); + break; + case 25: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton25 : Qbutton25up)); + break; + case 26: + SET_KEY_DATA_KEYSYM(returned_value, (down ? Qbutton26 : Qbutton26up)); + break; default: SET_KEY_DATA_KEYSYM (returned_value, (down ? Qbutton0 : Qbutton0up)); break; @@ -1552,7 +1728,26 @@ EQ (raw_key.keysym, Qbutton4) || EQ (raw_key.keysym, Qbutton4up) || EQ (raw_key.keysym, Qbutton5) || EQ (raw_key.keysym, Qbutton5up) || EQ (raw_key.keysym, Qbutton6) || EQ (raw_key.keysym, Qbutton6up) || - EQ (raw_key.keysym, Qbutton7) || EQ (raw_key.keysym, Qbutton7up)) + EQ (raw_key.keysym, Qbutton7) || EQ (raw_key.keysym, Qbutton7up) || + EQ (raw_key.keysym, Qbutton8) || EQ (raw_key.keysym, Qbutton8up) || + EQ (raw_key.keysym, Qbutton9) || EQ (raw_key.keysym, Qbutton9up) || + EQ (raw_key.keysym, Qbutton10) || EQ (raw_key.keysym, Qbutton10up) || + EQ (raw_key.keysym, Qbutton11) || EQ (raw_key.keysym, Qbutton11up) || + EQ (raw_key.keysym, Qbutton12) || EQ (raw_key.keysym, Qbutton12up) || + EQ (raw_key.keysym, Qbutton13) || EQ (raw_key.keysym, Qbutton13up) || + EQ (raw_key.keysym, Qbutton14) || EQ (raw_key.keysym, Qbutton14up) || + EQ (raw_key.keysym, Qbutton15) || EQ (raw_key.keysym, Qbutton15up) || + EQ (raw_key.keysym, Qbutton16) || EQ (raw_key.keysym, Qbutton16up) || + EQ (raw_key.keysym, Qbutton17) || EQ (raw_key.keysym, Qbutton17up) || + EQ (raw_key.keysym, Qbutton18) || EQ (raw_key.keysym, Qbutton18up) || + EQ (raw_key.keysym, Qbutton19) || EQ (raw_key.keysym, Qbutton19up) || + EQ (raw_key.keysym, Qbutton20) || EQ (raw_key.keysym, Qbutton20up) || + EQ (raw_key.keysym, Qbutton21) || EQ (raw_key.keysym, Qbutton21up) || + EQ (raw_key.keysym, Qbutton22) || EQ (raw_key.keysym, Qbutton22up) || + EQ (raw_key.keysym, Qbutton23) || EQ (raw_key.keysym, Qbutton23up) || + EQ (raw_key.keysym, Qbutton24) || EQ (raw_key.keysym, Qbutton24up) || + EQ (raw_key.keysym, Qbutton25) || EQ (raw_key.keysym, Qbutton25up) || + EQ (raw_key.keysym, Qbutton26) || EQ (raw_key.keysym, Qbutton26up)) invalid_operation ("Mouse-clicks can't appear in saved keyboard macros", Qunbound); @@ -4063,14 +4258,52 @@ EQ (keysym, Qbutton5) || EQ (keysym, Qbutton6) || EQ (keysym, Qbutton7) || + EQ (keysym, Qbutton8) || + EQ (keysym, Qbutton9) || + EQ (keysym, Qbutton10) || + EQ (keysym, Qbutton11) || + EQ (keysym, Qbutton12) || + EQ (keysym, Qbutton13) || + EQ (keysym, Qbutton14) || + EQ (keysym, Qbutton15) || + EQ (keysym, Qbutton16) || + EQ (keysym, Qbutton17) || + EQ (keysym, Qbutton18) || + EQ (keysym, Qbutton19) || + EQ (keysym, Qbutton20) || + EQ (keysym, Qbutton21) || + EQ (keysym, Qbutton22) || + EQ (keysym, Qbutton23) || + EQ (keysym, Qbutton24) || + EQ (keysym, Qbutton25) || + EQ (keysym, Qbutton26) || EQ (keysym, Qbutton0up) || EQ (keysym, Qbutton1up) || EQ (keysym, Qbutton2up) || EQ (keysym, Qbutton3up) || EQ (keysym, Qbutton4up) || EQ (keysym, Qbutton5up) || - EQ (keysym, Qbutton6up) || - EQ (keysym, Qbutton7up)))) + EQ (keysym, Qbutton6up) || + EQ (keysym, Qbutton7up) || + EQ (keysym, Qbutton8up) || + EQ (keysym, Qbutton9up) || + EQ (keysym, Qbutton10up) || + EQ (keysym, Qbutton11up) || + EQ (keysym, Qbutton12up) || + EQ (keysym, Qbutton13up) || + EQ (keysym, Qbutton14up) || + EQ (keysym, Qbutton15up) || + EQ (keysym, Qbutton16up) || + EQ (keysym, Qbutton17up) || + EQ (keysym, Qbutton18up) || + EQ (keysym, Qbutton19up) || + EQ (keysym, Qbutton20up) || + EQ (keysym, Qbutton21up) || + EQ (keysym, Qbutton22up) || + EQ (keysym, Qbutton23up) || + EQ (keysym, Qbutton24up) || + EQ (keysym, Qbutton25up) || + EQ (keysym, Qbutton26up)))) return; /* If this command in this map is shadowed by some other map, ignore it. */ @@ -4382,6 +4615,25 @@ DEFSYMBOL (Qbutton5); DEFSYMBOL (Qbutton6); DEFSYMBOL (Qbutton7); + DEFSYMBOL (Qbutton8); + DEFSYMBOL (Qbutton9); + DEFSYMBOL (Qbutton10); + DEFSYMBOL (Qbutton11); + DEFSYMBOL (Qbutton12); + DEFSYMBOL (Qbutton13); + DEFSYMBOL (Qbutton14); + DEFSYMBOL (Qbutton15); + DEFSYMBOL (Qbutton16); + DEFSYMBOL (Qbutton17); + DEFSYMBOL (Qbutton18); + DEFSYMBOL (Qbutton19); + DEFSYMBOL (Qbutton20); + DEFSYMBOL (Qbutton21); + DEFSYMBOL (Qbutton22); + DEFSYMBOL (Qbutton23); + DEFSYMBOL (Qbutton24); + DEFSYMBOL (Qbutton25); + DEFSYMBOL (Qbutton26); DEFSYMBOL (Qbutton0up); DEFSYMBOL (Qbutton1up); DEFSYMBOL (Qbutton2up); @@ -4390,6 +4642,25 @@ DEFSYMBOL (Qbutton5up); DEFSYMBOL (Qbutton6up); DEFSYMBOL (Qbutton7up); + DEFSYMBOL (Qbutton8up); + DEFSYMBOL (Qbutton9up); + DEFSYMBOL (Qbutton10up); + DEFSYMBOL (Qbutton11up); + DEFSYMBOL (Qbutton12up); + DEFSYMBOL (Qbutton13up); + DEFSYMBOL (Qbutton14up); + DEFSYMBOL (Qbutton15up); + DEFSYMBOL (Qbutton16up); + DEFSYMBOL (Qbutton17up); + DEFSYMBOL (Qbutton18up); + DEFSYMBOL (Qbutton19up); + DEFSYMBOL (Qbutton20up); + DEFSYMBOL (Qbutton21up); + DEFSYMBOL (Qbutton22up); + DEFSYMBOL (Qbutton23up); + DEFSYMBOL (Qbutton24up); + DEFSYMBOL (Qbutton25up); + DEFSYMBOL (Qbutton26up); DEFSYMBOL (Qmouse_1); DEFSYMBOL (Qmouse_2); DEFSYMBOL (Qmouse_3); @@ -4397,6 +4668,25 @@ DEFSYMBOL (Qmouse_5); DEFSYMBOL (Qmouse_6); DEFSYMBOL (Qmouse_7); + DEFSYMBOL (Qmouse_8); + DEFSYMBOL (Qmouse_9); + DEFSYMBOL (Qmouse_10); + DEFSYMBOL (Qmouse_11); + DEFSYMBOL (Qmouse_12); + DEFSYMBOL (Qmouse_13); + DEFSYMBOL (Qmouse_14); + DEFSYMBOL (Qmouse_15); + DEFSYMBOL (Qmouse_16); + DEFSYMBOL (Qmouse_17); + DEFSYMBOL (Qmouse_18); + DEFSYMBOL (Qmouse_19); + DEFSYMBOL (Qmouse_20); + DEFSYMBOL (Qmouse_21); + DEFSYMBOL (Qmouse_22); + DEFSYMBOL (Qmouse_23); + DEFSYMBOL (Qmouse_24); + DEFSYMBOL (Qmouse_25); + DEFSYMBOL (Qmouse_26); DEFSYMBOL (Qdown_mouse_1); DEFSYMBOL (Qdown_mouse_2); DEFSYMBOL (Qdown_mouse_3); @@ -4404,6 +4694,25 @@ DEFSYMBOL (Qdown_mouse_5); DEFSYMBOL (Qdown_mouse_6); DEFSYMBOL (Qdown_mouse_7); + DEFSYMBOL (Qdown_mouse_8); + DEFSYMBOL (Qdown_mouse_9); + DEFSYMBOL (Qdown_mouse_10); + DEFSYMBOL (Qdown_mouse_11); + DEFSYMBOL (Qdown_mouse_12); + DEFSYMBOL (Qdown_mouse_13); + DEFSYMBOL (Qdown_mouse_14); + DEFSYMBOL (Qdown_mouse_15); + DEFSYMBOL (Qdown_mouse_16); + DEFSYMBOL (Qdown_mouse_17); + DEFSYMBOL (Qdown_mouse_18); + DEFSYMBOL (Qdown_mouse_19); + DEFSYMBOL (Qdown_mouse_20); + DEFSYMBOL (Qdown_mouse_21); + DEFSYMBOL (Qdown_mouse_22); + DEFSYMBOL (Qdown_mouse_23); + DEFSYMBOL (Qdown_mouse_24); + DEFSYMBOL (Qdown_mouse_25); + DEFSYMBOL (Qdown_mouse_26); DEFSYMBOL (Qmenu_selection); DEFSYMBOL (QLFD); DEFSYMBOL (QTAB); diff -r 71bf2c5667ba -r 66411359ce4e src/keymap.h --- a/src/keymap.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/keymap.h Sat Oct 25 21:40:46 2008 +0900 @@ -40,6 +40,11 @@ extern Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qshift, Qsuper; extern Lisp_Object Qbutton1, Qbutton2, Qbutton3, Qbutton4, Qbutton5; +extern Lisp_Object Qbutton6, Qbutton7, Qbutton8, Qbutton9, Qbutton10; +extern Lisp_Object Qbutton11, Qbutton12, Qbutton13, Qbutton14, Qbutton15; +extern Lisp_Object Qbutton16, Qbutton17, Qbutton18, Qbutton19, Qbutton20; +extern Lisp_Object Qbutton21, Qbutton22, Qbutton23, Qbutton24, Qbutton25; +extern Lisp_Object Qbutton26; extern Lisp_Object Vmeta_prefix_char; Lisp_Object get_keymap (Lisp_Object object, int errorp, int autoload); diff -r 71bf2c5667ba -r 66411359ce4e src/linuxplay.c --- a/src/linuxplay.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/linuxplay.c Sat Oct 25 21:40:46 2008 +0900 @@ -275,8 +275,9 @@ fmtType ffmt; int fmt,speed,tracks; void *pptr, *optr, *cptr, *sptr; - int wrtn,rrtn,crtn,prtn; - Binbyte sndbuf[SNDBUFSZ]; + int wrtn, crtn; + size_t prtn, rrtn; + Binbyte sndbuf[SNDBUFSZ]; /* We need to read at least the header information before we can start doing anything */ diff -r 71bf2c5667ba -r 66411359ce4e src/lisp.h --- a/src/lisp.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/lisp.h Sat Oct 25 21:40:46 2008 +0900 @@ -250,6 +250,14 @@ typedef unsigned long uintptr_t; #endif +#if SIZEOF_VOID_P == 8 +#define DEADBEEF_CONSTANT 0xCAFEBABEDEADBEEF +#elif SIZEOF_VOID_P == 4 +#define DEADBEEF_CONSTANT 0xDEADBEEF +#else +#error "What size are your pointers, really?" +#endif /* SIZEOF_VOID_P == 8 */ + /* ---------------------- definition of EMACS_INT --------------------- */ /* EMACS_INT is the underlying integral type into which a Lisp_Object must fit. @@ -1084,7 +1092,7 @@ #define xfree(lvalue, type) do \ { \ xfree_1 (lvalue); \ - VOIDP_CAST (lvalue) = (void *) 0xDEADBEEF; \ + VOIDP_CAST (lvalue) = (void *) DEADBEEF_CONSTANT; \ } while (0) #else #define xfree(lvalue,type) xfree_1 (lvalue) @@ -1323,7 +1331,7 @@ /* This is shared by process.h, events.h and others in future. See events.h for description */ -typedef unsigned int USID; +typedef unsigned EMACS_INT USID; typedef int face_index; typedef int glyph_index; typedef struct lstream Lstream; /* lstream.h */ @@ -2882,7 +2890,15 @@ #else /* no error checking */ -#define XCHAR_OR_INT(obj) (CHARP (obj) ? XCHAR (obj) : XINT (obj)) +/* obj is multiply eval'ed and not an lvalue; use an inline function instead + of a macro. */ +DECLARE_INLINE_HEADER ( +EMACS_INT +XCHAR_OR_INT (Lisp_Object obj) +) +{ + return CHARP (obj) ? XCHAR (obj) : XINT (obj); +} #endif /* no error checking */ @@ -4920,6 +4936,7 @@ EXFUN (Fprinc, 2); EXFUN (Fprint, 2); +Lisp_Object prin1_to_string (Lisp_Object, int); /* Lower-level ways to output data: */ void default_object_printer (Lisp_Object, Lisp_Object, int); @@ -4970,6 +4987,7 @@ #define DECIMAL_PRINT_SIZE(integral_type) \ (((2410824 * sizeof (integral_type)) / 1000000) + 3) void long_to_string (char *, long); +void ulong_to_bit_string (char *, unsigned long); extern int print_escape_newlines; extern MODULE_API int print_readably; Lisp_Object internal_with_output_to_temp_buffer (Lisp_Object, @@ -5054,7 +5072,7 @@ EXFUN (Ffboundp, 1); EXFUN (Ffset, 2); EXFUN (Fintern, 2); -EXFUN (Fintern_soft, 2); +EXFUN (Fintern_soft, 3); EXFUN (Fkill_local_variable, 1); EXFUN (Fset, 2); EXFUN (Fset_default, 2); @@ -5215,7 +5233,6 @@ extern Lisp_Object Vcharset_latin_iso8859_4; extern Lisp_Object Vcharset_thai_tis620; extern Lisp_Object Vcharset_greek_iso8859_7; -extern Lisp_Object Vcharset_arabic_iso8859_6; extern Lisp_Object Vcharset_hebrew_iso8859_8; extern Lisp_Object Vcharset_katakana_jisx0201; extern Lisp_Object Vcharset_latin_jisx0201; @@ -5484,7 +5501,7 @@ void free_charset_unicode_tables (Lisp_Object charset); void recalculate_unicode_precedence (void); extern Lisp_Object Qunicode; -extern Lisp_Object Qutf_16, Qutf_8, Qucs_4, Qutf_7; +extern Lisp_Object Qutf_16, Qutf_8, Qucs_4, Qutf_7, Qutf_32; #ifdef MEMORY_USAGE_STATS Bytecount compute_from_unicode_table_size (Lisp_Object charset, struct overhead_stats *stats); diff -r 71bf2c5667ba -r 66411359ce4e src/lread.c --- a/src/lread.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/lread.c Sat Oct 25 21:40:46 2008 +0900 @@ -744,6 +744,25 @@ internal_bind_lisp_object (&Vfile_domain, Qnil); #endif + /* Is there a #!? If so, read it, and unread ;!. + + GNU implement this by treating any #! anywhere in the source text as + commenting out the whole line. */ + { + char shebangp[2]; + int num_read; + + num_read = Lstream_read (XLSTREAM (lispstream), shebangp, + sizeof(shebangp)); + if (sizeof(shebangp) == num_read + && 0 == strncmp("#!", shebangp, sizeof(shebangp))) + { + shebangp[0] = ';'; + } + + Lstream_unread (XLSTREAM (lispstream), shebangp, num_read); + } + /* Now determine what sort of ELC file we're reading in. */ internal_bind_int (&load_byte_code_version, load_byte_code_version); if (reading_elc) @@ -1694,24 +1713,26 @@ } } + if (i >= 0x110000 || i < 0) + { + syntax_error ("Not a Unicode code point", make_int(i)); + } + lisp_char = Funicode_to_char(make_int(i), Qnil); if (EQ(Qnil, lisp_char)) { - /* This is ugly and horrible and trashes the user's data, but - it's what unicode.c does. In the future, unicode-to-char - should not return nil. */ -#ifdef MULE - i = make_ichar (Vcharset_japanese_jisx0208, 34 + 128, 46 + 128); -#else - i = '~'; -#endif - return i; + /* Will happen on non-Mule. Silent corruption is what happens + elsewhere, and we used to do that to be consistent, but GNU error, + so people writing portable code need to be able to handle that, and + given a choice I prefer that behaviour. + + An undesirable aspect to this error is that the code point is shown + as a decimal integer, which is mostly unreadable. */ + syntax_error ("Unsupported Unicode code point", make_int(i)); } - else - { - return XCHAR(lisp_char); - } + + return XCHAR(lisp_char); } @@ -1834,6 +1855,28 @@ break; } } + + if (count == 3) + { + c = readchar (readcharfun); + if ((c >= '0' && c <= '9') || + (c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F')) + { + Lisp_Object args[2]; + + if (c >= '0' && c <= '9') i = (i << 4) + (c - '0'); + else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10; + else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10; + + args[0] = build_string ("?\\x%x"); + args[1] = make_int (i); + syntax_error ("Overlong hex character escape", + Fformat (2, args)); + } + unreadchar (readcharfun, c); + } + return i; } case 'U': @@ -2027,7 +2070,7 @@ overflow: #ifdef HAVE_BIGNUM { - bignum_set_string (scratch_bignum, (const char *) buf, 0); + bignum_set_string (scratch_bignum, (const char *) buf, base); return make_bignum_bg (scratch_bignum); } #else @@ -2761,6 +2804,8 @@ if (c == '\\') c = read_escape (readcharfun); + if (c < 0) + return Fsignal (Qinvalid_read_syntax, list1 (READCHARFUN_MAYBE (readcharfun))); return make_char (c); } diff -r 71bf2c5667ba -r 66411359ce4e src/make-src-depend --- a/src/make-src-depend Sat Oct 25 20:35:36 2008 +0900 +++ b/src/make-src-depend Sat Oct 25 21:40:46 2008 +0900 @@ -115,7 +115,7 @@ my $file = shift; my $ofile = $file; $ofile =~ s/c$/o/; print "$ofile: "; if (exists $uses{$file}{'lisp.h'}) { - delete @{%{$uses{$file}}}{@LISP_H}; + delete $uses{$file}{@LISP_H}; $uses{$file}{'$(LISP_H)'} = 1; } # Note: If both config.h and lisp.h are dependencies, config.h got deleted diff -r 71bf2c5667ba -r 66411359ce4e src/mc-alloc.c --- a/src/mc-alloc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/mc-alloc.c Sat Oct 25 21:40:46 2008 +0900 @@ -179,11 +179,11 @@ #ifdef USE_HASH_TABLE # define HASH(hi) ((hi) & (LEVEL1_SIZE - 1)) -# define L1_INDEX(p) HASH ((EMACS_INT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) +# define L1_INDEX(p) HASH ((EMACS_UINT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) #else -# define L1_INDEX(p) ((EMACS_INT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) +# define L1_INDEX(p) ((EMACS_UINT) p >> (LOG_LEVEL2_SIZE + LOG_PAGE_SIZE)) #endif -#define L2_INDEX(p) (((EMACS_INT) p >> LOG_PAGE_SIZE) & (LEVEL2_SIZE - 1)) +#define L2_INDEX(p) (((EMACS_UINT) p >> LOG_PAGE_SIZE) & (LEVEL2_SIZE - 1)) @@ -393,7 +393,7 @@ #define BYTES_TO_PAGES(bytes) (div_PAGE_SIZE ((bytes + (PAGE_SIZE - 1)))) #define PAGE_SIZE_ALIGNMENT(address) \ - (void *) ((((EMACS_INT) (address)) + PAGE_SIZE) & ~(PAGE_SIZE - 1)) + (void *) ((((EMACS_UINT) (address)) + PAGE_SIZE) & ~(PAGE_SIZE - 1)) #define PH_ON_FREE_LIST_P(ph) \ (ph && PH_PLH (ph) && (PLH_LIST_TYPE (PH_PLH (ph)) == FREE_LIST)) @@ -618,7 +618,7 @@ /* Bit_Arrays bit at pos to val. */ static void -set_bit (Rawbyte *bit_array, EMACS_INT pos, EMACS_INT val) +set_bit (Rawbyte *bit_array, EMACS_INT pos, EMACS_UINT val) { #if N_MARK_BITS > 1 EMACS_INT i; @@ -1576,15 +1576,6 @@ } -/* Frees the cell pointed to by ptr. */ -void -mc_free (void *UNUSED (ptr)) -{ - /* Manual frees are not allowed with asynchronous finalization */ - return; -} - - /* Changes the size of the cell pointed to by ptr. Returns the new address of the new cell with new size. */ void * @@ -1603,12 +1594,10 @@ #ifdef ALLOC_TYPE_STATS inc_lrecord_stats (size, (struct lrecord_header *) result); #endif /* not ALLOC_TYPE_STATS */ - /* mc_free (ptr); not needed, will be collected next gc */ return result; } else { - /* mc_free (ptr); not needed, will be collected next gc */ return 0; } } @@ -1659,7 +1648,7 @@ ABORT (); } - page_size_div_2 = (EMACS_INT) SYS_PAGE_SIZE >> 1; + page_size_div_2 = (EMACS_UINT) SYS_PAGE_SIZE >> 1; mc_allocator_globals.used_heap_pages = (page_list_header *) xmalloc_and_zero ((N_USED_PAGE_LISTS + 1) diff -r 71bf2c5667ba -r 66411359ce4e src/mc-alloc.h --- a/src/mc-alloc.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/mc-alloc.h Sat Oct 25 21:40:46 2008 +0900 @@ -49,12 +49,6 @@ dynamic arrays use this function. */ void *mc_alloc_array (size_t size, EMACS_INT elemcount); -/* Free the object pointed to by ptr and make its memory re-usable - again. The memory must have been returned by a previous call to - mc_alloc(). This can be used to free memory explicitly, outside a - garbage collection. */ -void mc_free (void *ptr); - /* Modify the size of the memory block pointed to by ptr. Return the address of the new block of given size. The content of the memory block will be unchanged to the minimum of the old and new sizes: if diff -r 71bf2c5667ba -r 66411359ce4e src/mule-ccl.c --- a/src/mule-ccl.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/mule-ccl.c Sat Oct 25 21:40:46 2008 +0900 @@ -29,15 +29,13 @@ #include "charset.h" #include "mule-ccl.h" #include "file-coding.h" +#include "elhash.h" Lisp_Object Qccl_error; /* This contains all code conversion map available to CCL. */ Lisp_Object Vcode_conversion_map_vector; -/* Alist of fontname patterns vs corresponding CCL program. */ -Lisp_Object Vfont_ccl_encoder_alist; - /* This symbol is a property which associates with ccl program vector. Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. Moved to general-slots.h. */ @@ -59,6 +57,15 @@ already resolved to index numbers or not. */ Lisp_Object Vccl_program_table; +/* Vector of registered hash tables for translation. */ +Lisp_Object Vtranslation_hash_table_vector; + +/* Return a hash table of id number ID. */ +#define GET_HASH_TABLE(id) \ + (XHASH_TABLE (XCDR(XVECTOR(Vtranslation_hash_table_vector)->contents[(id)]))) +/* Copied from fns.c. */ +#define HASH_VALUE(H, IDX) AREF ((H)->key_and_value, 2 * (IDX) + 1) + /* CCL (Code Conversion Language) is a simple language which has operations on one input buffer, one output buffer, and 7 registers. The syntax of CCL is described in `ccl.el'. Emacs Lisp function @@ -627,14 +634,17 @@ { \ ccl_prog = ccl_prog_stack_struct[0].ccl_prog; \ ic = ccl_prog_stack_struct[0].ic; \ + eof_ic = ccl_prog_stack_struct[0].eof_ic; \ } \ CCL_INVALID_CMD; \ } \ ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; \ ccl_prog_stack_struct[stack_idx].ic = (ret_ic); \ + ccl_prog_stack_struct[stack_idx].eof_ic = eof_ic; \ stack_idx++; \ ccl_prog = called_ccl.prog; \ ic = CCL_HEADER_MAIN; \ + eof_ic = XINT (ccl_prog[CCL_HEADER_EOF]); \ /* The "if (1)" prevents warning \ "end-of loop code not reached" */ \ if (1) goto ccl_repeat; \ @@ -651,6 +661,19 @@ set reg[RRR] to -1. */ +#define CCL_LookupIntConstTbl 0x13 /* Lookup multibyte character by + integer key. Afterwards R7 set + to 1 iff lookup succeeded. + 1:ExtendedCOMMNDRrrRRRXXXXXXXX + 2:ARGUMENT(Hash table ID) */ + +#define CCL_LookupCharConstTbl 0x14 /* Lookup integer by multibyte + character key. Afterwards R7 set + to 1 iff lookup succeeded. + 1:ExtendedCOMMNDRrrRRRrrrXXXXX + 2:ARGUMENT(Hash table ID) */ + + /* CCL arithmetic/logical operators. */ #define CCL_PLUS 0x00 /* X = Y + Z */ #define CCL_MINUS 0x01 /* X = Y - Z */ @@ -773,7 +796,7 @@ { \ for (i = 0; i < (len); i++) \ { \ - ch = ((XINT (ccl_prog[ic + (i / 3)])) \ + ch = ((XCHAR_OR_INT (ccl_prog[ic + (i / 3)])) \ >> ((2 - (i % 3)) * 8)) & 0xFF; \ if (ch == '\n') \ { \ @@ -802,7 +825,7 @@ { \ for (i = 0; i < (len); i++) \ { \ - ch = ((XINT (ccl_prog[ic + (i / 3)])) \ + ch = ((XCHAR_OR_INT (ccl_prog[ic + (i / 3)])) \ >> ((2 - (i % 3)) * 8)) & 0xFF; \ if (!ichar_multibyte_p(ch)) \ { \ @@ -837,7 +860,7 @@ } while (0) #define POSSIBLE_LEADING_BYTE_P(leading_byte) \ - ((leading_byte > MIN_LEADING_BYTE) && \ + ((leading_byte >= MIN_LEADING_BYTE) && \ (leading_byte - MIN_LEADING_BYTE) < NUM_LEADING_BYTES) /* Set C to the character code made from CHARSET and CODE. This is @@ -864,7 +887,7 @@ } \ else if (!NILP(charset_by_leading_byte(charset)) \ && ((code) >= 32) \ - && ((code) < 256 || ((code >> 8) & 0x7F) >= 32)) \ + && ((code) < 256 || ((code >> 7) & 0x7F) >= 32)) \ { \ int c1, c2 = 0; \ \ @@ -875,7 +898,7 @@ } \ else \ { \ - c1 = ((code) >> 8) & 0x7F; \ + c1 = ((code) >> 7) & 0x7F; \ c2 = (code) & 0x7F; \ } \ c = make_ichar (charset_by_leading_byte(charset), \ @@ -898,7 +921,7 @@ #ifdef CCL_DEBUG #define CCL_DEBUG_BACKTRACE_LEN 256 -int ccl_backtrace_table[CCL_BACKTRACE_TABLE]; +int ccl_backtrace_table[CCL_DEBUG_BACKTRACE_LEN]; int ccl_backtrace_idx; #endif @@ -906,6 +929,7 @@ { Lisp_Object *ccl_prog; /* Pointer to an array of CCL code. */ int ic; /* Instruction Counter. */ + int eof_ic; /* Instruction Counter to jump on EOF. */ }; /* For the moment, we only support depth 256 of stack. */ @@ -930,8 +954,10 @@ int stack_idx = ccl->stack_idx; /* Instruction counter of the current CCL code. */ int this_ic = 0; + int eof_ic = ccl->eof_ic; + int eof_hit = 0; - if (ic >= ccl->eof_ic) + if (ic >= eof_ic) ic = CCL_HEADER_MAIN; if (ccl->buf_magnification ==0) /* We can't produce any bytes. */ @@ -966,7 +992,7 @@ } this_ic = ic; - code = XINT (ccl_prog[ic]); ic++; + code = XCHAR_OR_INT (ccl_prog[ic]); ic++; field1 = code >> 8; field2 = (code & 0xFF) >> 5; @@ -987,7 +1013,7 @@ break; case CCL_SetConst: /* 00000000000000000000rrrXXXXX */ - reg[rrr] = XINT (ccl_prog[ic]); + reg[rrr] = XCHAR_OR_INT (ccl_prog[ic]); ic++; break; @@ -998,7 +1024,7 @@ but the left one was already there so clearly the intention was an unsigned comparison. --ben */ if ((unsigned int) i < (unsigned int) j) - reg[rrr] = XINT (ccl_prog[ic + i]); + reg[rrr] = XCHAR_OR_INT (ccl_prog[ic + i]); ic += j; break; @@ -1026,13 +1052,13 @@ break; case CCL_WriteConstJump: /* A--D--D--R--E--S--S-000XXXXX */ - i = XINT (ccl_prog[ic]); + i = XCHAR_OR_INT (ccl_prog[ic]); CCL_WRITE_CHAR (i); ic += ADDR; break; case CCL_WriteConstReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ - i = XINT (ccl_prog[ic]); + i = XCHAR_OR_INT (ccl_prog[ic]); CCL_WRITE_CHAR (i); ic++; CCL_READ_CHAR (reg[rrr]); @@ -1040,7 +1066,7 @@ break; case CCL_WriteStringJump: /* A--D--D--R--E--S--S-000XXXXX */ - j = XINT (ccl_prog[ic]); + j = XCHAR_OR_INT (ccl_prog[ic]); ic++; CCL_WRITE_STRING (j); ic += ADDR - 1; @@ -1048,11 +1074,11 @@ case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ i = reg[rrr]; - j = XINT (ccl_prog[ic]); + j = XCHAR_OR_INT (ccl_prog[ic]); /* #### see comment at CCL_SetArray */ if ((unsigned int) i < (unsigned int) j) { - i = XINT (ccl_prog[ic + 1 + i]); + i = XCHAR_OR_INT (ccl_prog[ic + 1 + i]); CCL_WRITE_CHAR (i); } ic += j + 2; @@ -1071,9 +1097,9 @@ case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ /* #### see comment at CCL_SetArray */ if ((unsigned int) reg[rrr] < (unsigned int) field1) - ic += XINT (ccl_prog[ic + reg[rrr]]); + ic += XCHAR_OR_INT (ccl_prog[ic + reg[rrr]]); else - ic += XINT (ccl_prog[ic + field1]); + ic += XCHAR_OR_INT (ccl_prog[ic + field1]); break; case CCL_ReadRegister: /* CCCCCCCCCCCCCCCCCCCCrrXXXXX */ @@ -1081,7 +1107,7 @@ { CCL_READ_CHAR (reg[rrr]); if (!field1) break; - code = XINT (ccl_prog[ic]); ic++; + code = XCHAR_OR_INT (ccl_prog[ic]); ic++; field1 = code >> 8; field2 = (code & 0xFF) >> 5; } @@ -1090,7 +1116,7 @@ case CCL_WriteExprConst: /* 1:00000OPERATION000RRR000XXXXX */ rrr = 7; i = reg[RRR]; - j = XINT (ccl_prog[ic]); + j = XCHAR_OR_INT (ccl_prog[ic]); op = field1 >> 6; jump_address = ic + 1; goto ccl_set_expr; @@ -1101,7 +1127,7 @@ i = reg[rrr]; CCL_WRITE_CHAR (i); if (!field1) break; - code = XINT (ccl_prog[ic]); ic++; + code = XCHAR_OR_INT (ccl_prog[ic]); ic++; field1 = code >> 8; field2 = (code & 0xFF) >> 5; } @@ -1124,7 +1150,7 @@ following code. */ if (rrr) { - prog_id = XINT (ccl_prog[ic]); + prog_id = XCHAR_OR_INT (ccl_prog[ic]); ic++; } else @@ -1141,15 +1167,18 @@ { ccl_prog = ccl_prog_stack_struct[0].ccl_prog; ic = ccl_prog_stack_struct[0].ic; + eof_ic = ccl_prog_stack_struct[0].eof_ic; } CCL_INVALID_CMD; } ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; ccl_prog_stack_struct[stack_idx].ic = ic; + ccl_prog_stack_struct[stack_idx].eof_ic = eof_ic; stack_idx++; ccl_prog = XVECTOR (XVECTOR (slot)->contents[1])->contents; ic = CCL_HEADER_MAIN; + eof_ic = XINT (ccl_prog[CCL_HEADER_EOF]); } break; @@ -1168,7 +1197,7 @@ /* #### see comment at CCL_SetArray */ if ((unsigned int) i < (unsigned int) field1) { - j = XINT (ccl_prog[ic + i]); + j = XCHAR_OR_INT (ccl_prog[ic + i]); CCL_WRITE_CHAR (j); } ic += field1; @@ -1180,6 +1209,9 @@ stack_idx--; ccl_prog = ccl_prog_stack_struct[stack_idx].ccl_prog; ic = ccl_prog_stack_struct[stack_idx].ic; + eof_ic = ccl_prog_stack_struct[stack_idx].eof_ic; + if (eof_hit) + ic = eof_ic; break; } if (src) @@ -1190,7 +1222,7 @@ CCL_SUCCESS; case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */ - i = XINT (ccl_prog[ic]); + i = XCHAR_OR_INT (ccl_prog[ic]); ic++; op = field1 >> 6; goto ccl_expr_self; @@ -1227,7 +1259,7 @@ case CCL_SetExprConst: /* 00000OPERATION000RRRrrrXXXXX */ i = reg[RRR]; - j = XINT (ccl_prog[ic]); + j = XCHAR_OR_INT (ccl_prog[ic]); op = field1 >> 6; jump_address = ++ic; goto ccl_set_expr; @@ -1243,9 +1275,9 @@ CCL_READ_CHAR (reg[rrr]); case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */ i = reg[rrr]; - op = XINT (ccl_prog[ic]); + op = XCHAR_OR_INT (ccl_prog[ic]); jump_address = ic++ + ADDR; - j = XINT (ccl_prog[ic]); + j = XCHAR_OR_INT (ccl_prog[ic]); ic++; rrr = 7; goto ccl_set_expr; @@ -1254,9 +1286,9 @@ CCL_READ_CHAR (reg[rrr]); case CCL_JumpCondExprReg: i = reg[rrr]; - op = XINT (ccl_prog[ic]); + op = XCHAR_OR_INT (ccl_prog[ic]); jump_address = ic++ + ADDR; - j = reg[XINT (ccl_prog[ic])]; + j = reg[XCHAR_OR_INT (ccl_prog[ic])]; ic++; rrr = 7; @@ -1358,7 +1390,7 @@ if ((src + 1) >= src_end) goto ccl_read_multibyte_character_suspend; reg[RRR] = *src++; - reg[rrr] = (*src++ & 0x7F); + reg[rrr] = (*src++ & 0xFF); } else if (i == PRE_LEADING_BYTE_PRIVATE_2) { @@ -1378,10 +1410,32 @@ break; ccl_read_multibyte_character_suspend: + if (src <= src_end && ccl->last_block) + { + /* #### Unclear when this happens. GNU use + CHARSET_8_BIT_CONTROL here, which we can't. */ + if (i < 0x80) + { + reg[RRR] = LEADING_BYTE_ASCII; + reg[rrr] = i; + } + else if (i < 0xA0) + { + reg[RRR] = LEADING_BYTE_CONTROL_1; + reg[rrr] = i - 0xA0; + } + else + { + reg[RRR] = LEADING_BYTE_LATIN_ISO8859_1; + reg[rrr] = i & 0x7F; + } + break; + } src--; if (ccl->last_block) { - ic = ccl->eof_ic; + ic = eof_ic; + eof_hit = 1; goto ccl_repeat; } else @@ -1438,7 +1492,7 @@ #if 0 /* XEmacs does not have translate_char or an equivalent. We do nothing on this operation. */ - op = XINT (ccl_prog[ic]); /* table */ + op = XCHAR_OR_INT (ccl_prog[ic]); /* table */ ic++; CCL_MAKE_CHAR (reg[RRR], reg[rrr], i); op = translate_char (GET_TRANSLATION_TABLE (op), i, -1, 0, 0); @@ -1454,7 +1508,8 @@ { Lisp_Object ucs; - CCL_MAKE_CHAR(reg[rrr], reg[RRR], op); + CCL_MAKE_CHAR (reg[rrr], reg[RRR], op); + ucs = Fchar_to_unicode(make_char(op)); if (NILP(ucs)) @@ -1465,7 +1520,7 @@ } else { - reg[rrr] = XINT(ucs); + reg[rrr] = XCHAR_OR_INT(ucs); if (-1 == reg[rrr]) { reg[rrr] = 0xFFFD; /* REPLACEMENT CHARACTER */ @@ -1488,7 +1543,7 @@ if (j != 0) { - i = (i << 8) | j; + i = (i << 7) | j; } reg[rrr] = i; @@ -1500,12 +1555,64 @@ break; } + case CCL_LookupIntConstTbl: + op = XCHAR_OR_INT (ccl_prog[ic]); /* table */ + ic++; + { + struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); + htentry *e = find_htentry(make_int (reg[RRR]), h); + Lisp_Object scratch; + + if (!HTENTRY_CLEAR_P(e)) + { + op = XCHARVAL (e->value); + if (!valid_ichar_p(op)) + { + CCL_INVALID_CMD; + } + + BREAKUP_ICHAR (op, scratch, i, j); + reg[RRR] = XCHARSET_ID(scratch); + + if (j != 0) + { + i = (i << 7) | j; + } + reg[rrr] = i; + reg[7] = 1; /* r7 true for success */ + } + else + reg[7] = 0; + } + break; + + case CCL_LookupCharConstTbl: + op = XCHAR_OR_INT (ccl_prog[ic]); /* table */ + ic++; + CCL_MAKE_CHAR (reg[RRR], reg[rrr], i); + { + struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); + htentry *e = find_htentry(make_int(i), h); + + if (!HTENTRY_CLEAR_P(e)) + { + if (!INTP (e->value)) + CCL_INVALID_CMD; + reg[RRR] = XCHAR_OR_INT (e->value); + reg[7] = 1; /* r7 true for success */ + } + else + reg[7] = 0; + } + break; + + case CCL_IterateMultipleMap: { Lisp_Object map, content, attrib, value; int point, size, fin_ic; - j = XINT (ccl_prog[ic++]); /* number of maps. */ + j = XCHAR_OR_INT (ccl_prog[ic++]); /* number of maps. */ fin_ic = ic + j; op = reg[rrr]; if ((j > reg[RRR]) && (j >= 0)) @@ -1523,7 +1630,7 @@ for (;i < j;i++) { size = XVECTOR (Vcode_conversion_map_vector)->size; - point = XINT (ccl_prog[ic++]); + point = XCHAR_OR_INT (ccl_prog[ic++]); if (point >= size) continue; map = XVECTOR (Vcode_conversion_map_vector)->contents[point]; @@ -1569,7 +1676,7 @@ else if (INTP (content)) { reg[RRR] = i; - reg[rrr] = XINT(content); + reg[rrr] = XCHAR_OR_INT(content); break; } else if (EQ (content, Qt) || EQ (content, Qlambda)) @@ -1620,7 +1727,7 @@ stack_idx_of_map_multiple = 0; map_set_rest_length = - XINT (ccl_prog[ic++]); /* number of maps and separators. */ + XCHAR_OR_INT (ccl_prog[ic++]); /* number of maps and separators. */ fin_ic = ic + map_set_rest_length; op = reg[rrr]; @@ -1688,7 +1795,7 @@ do { for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) { - point = XINT(ccl_prog[ic]); + point = XCHAR_OR_INT(ccl_prog[ic]); if (point < 0) { /* +1 is for including separator. */ @@ -1749,7 +1856,7 @@ reg[RRR] = i; if (INTP (content)) { - op = XINT (content); + op = XCHAR_OR_INT (content); i += map_set_rest_length - 1; ic += map_set_rest_length - 1; POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); @@ -1807,7 +1914,7 @@ { Lisp_Object map, attrib, value, content; int size, point; - j = XINT (ccl_prog[ic++]); /* map_id */ + j = XCHAR_OR_INT (ccl_prog[ic++]); /* map_id */ op = reg[rrr]; if (j >= XVECTOR (Vcode_conversion_map_vector)->size) { @@ -1840,7 +1947,7 @@ if (NILP (content)) reg[RRR] = -1; else if (INTP (content)) - reg[rrr] = XINT (content); + reg[rrr] = XCHAR_OR_INT (content); else if (EQ (content, Qt)); else if (CONSP (content)) { @@ -1943,7 +2050,9 @@ for (i = 0; i < veclen; i++) { contents = XVECTOR (result)->contents[i]; - if (INTP (contents)) + /* XEmacs change; accept characters as well as integers, on the basis + that most CCL code written doesn't make a distinction. */ + if (INTP (contents) || CHARP(contents)) continue; else if (CONSP (contents) && SYMBOLP (XCAR (contents)) @@ -2107,8 +2216,8 @@ syntax_error ("Length of vector REGISTERS is not 8", Qunbound); for (i = 0; i < 8; i++) - ccl.reg[i] = (INTP (XVECTOR_DATA (reg)[i]) - ? XINT (XVECTOR_DATA (reg)[i]) + ccl.reg[i] = (INTP (XVECTOR_DATA (reg)[i]) || CHARP (XVECTOR_DATA (reg)[i]) + ? XCHAR_OR_INT (XVECTOR_DATA (reg)[i]) : 0); ccl_driver (&ccl, (const unsigned char *)0, @@ -2172,10 +2281,13 @@ XVECTOR_DATA (status)[i] = make_int (0); if (INTP (XVECTOR_DATA (status)[i])) ccl.reg[i] = XINT (XVECTOR_DATA (status)[i]); + if (CHARP (XVECTOR_DATA (status)[i])) + ccl.reg[i] = XCHAR (XVECTOR_DATA (status)[i]); } - if (INTP (XVECTOR (status)->contents[i])) + if (INTP (XVECTOR (status)->contents[i]) || + CHARP (XVECTOR (status)->contents[i])) { - i = XINT (XVECTOR_DATA (status)[8]); + i = XCHAR_OR_INT (XVECTOR_DATA (status)[8]); if (ccl.ic < i && i < ccl.size) ccl.ic = i; } @@ -2347,9 +2459,16 @@ void vars_of_mule_ccl (void) { + staticpro (&Vccl_program_table); Vccl_program_table = Fmake_vector (make_int (32), Qnil); +#ifdef DEBUG_XEMACS + DEFVAR_LISP ("ccl-program-table", + &Vccl_program_table /* +Vector containing all registered CCL programs. +*/ ); +#endif DEFSYMBOL (Qccl_program); DEFSYMBOL (Qccl_program_idx); DEFSYMBOL (Qcode_conversion_map); @@ -2360,19 +2479,15 @@ */ ); Vcode_conversion_map_vector = Fmake_vector (make_int (16), Qnil); - DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist /* -Alist of fontname patterns vs corresponding CCL program. -Each element looks like (REGEXP . CCL-CODE), - where CCL-CODE is a compiled CCL program. -When a font whose name matches REGEXP is used for displaying a character, - CCL-CODE is executed to calculate the code point in the font - from the charset number and position code(s) of the character which are set - in CCL registers R0, R1, and R2 before the execution. -The code point in the font is set in CCL registers R1 and R2 - when the execution terminated. -If the font is single-byte font, the register R2 is not used. + DEFVAR_LISP ("translation-hash-table-vector", + &Vtranslation_hash_table_vector /* +Vector containing all translation hash tables ever defined. +Comprises pairs (SYMBOL . TABLE) where SYMBOL and TABLE were set up by calls +to `define-translation-hash-table'. The vector is indexed by the table id +used by CCL. */ ); - Vfont_ccl_encoder_alist = Qnil; + Vtranslation_hash_table_vector = Qnil; + } #endif /* emacs */ diff -r 71bf2c5667ba -r 66411359ce4e src/mule-charset.c --- a/src/mule-charset.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/mule-charset.c Sat Oct 25 21:40:46 2008 +0900 @@ -47,7 +47,6 @@ Lisp_Object Vcharset_latin_iso8859_4; Lisp_Object Vcharset_thai_tis620; Lisp_Object Vcharset_greek_iso8859_7; -Lisp_Object Vcharset_arabic_iso8859_6; Lisp_Object Vcharset_hebrew_iso8859_8; Lisp_Object Vcharset_katakana_jisx0201; Lisp_Object Vcharset_latin_jisx0201; @@ -94,7 +93,6 @@ Qlatin_iso8859_4, Qthai_tis620, Qgreek_iso8859_7, - Qarabic_iso8859_6, Qhebrew_iso8859_8, Qkatakana_jisx0201, Qlatin_jisx0201, @@ -1112,7 +1110,6 @@ DEFSYMBOL (Qlatin_iso8859_4); DEFSYMBOL (Qthai_tis620); DEFSYMBOL (Qgreek_iso8859_7); - DEFSYMBOL (Qarabic_iso8859_6); DEFSYMBOL (Qhebrew_iso8859_8); DEFSYMBOL (Qkatakana_jisx0201); DEFSYMBOL (Qlatin_jisx0201); @@ -1236,15 +1233,6 @@ build_msg_string ("ISO8859-7 (Greek)"), build_msg_string ("ISO8859-7 (Greek)"), vector1(build_string("iso8859-7")), 0, 0); - staticpro (&Vcharset_arabic_iso8859_6); - Vcharset_arabic_iso8859_6 = - make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 2, - CHARSET_TYPE_96, 1, 1, 'G', - CHARSET_RIGHT_TO_LEFT, - build_string ("ISO8859-6"), - build_msg_string ("ISO8859-6 (Arabic)"), - build_msg_string ("ISO8859-6 (Arabic)"), - vector1(build_string ("iso8859-6")), 0, 0); staticpro (&Vcharset_hebrew_iso8859_8); Vcharset_hebrew_iso8859_8 = make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 2, diff -r 71bf2c5667ba -r 66411359ce4e src/mule-coding.c --- a/src/mule-coding.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/mule-coding.c Sat Oct 25 21:40:46 2008 +0900 @@ -104,7 +104,7 @@ if (XCHARSET_ENCODE_AS_UTF_8 (charset)) { encode_unicode_char (charset, c & charmask, 0, - dst, UNICODE_UTF_8, 0); + dst, UNICODE_UTF_8, 0, 0); } else { @@ -123,7 +123,7 @@ encode_unicode_char (charset, ch & charmask, c & charmask, dst, - UNICODE_UTF_8, 0); + UNICODE_UTF_8, 0, 0); } else { @@ -969,6 +969,7 @@ /* Used for handling UTF-8. */ unsigned char counter; + unsigned char indicated_length; }; static const struct memory_description ccs_description_1[] = @@ -1804,6 +1805,39 @@ } } +/* Note that this name conflicts with a function in unicode.c. */ +static void +decode_unicode_char (int ucs, unsigned_char_dynarr *dst) +{ + Ibyte work[MAX_ICHAR_LEN]; + int len; + Lisp_Object chr; + + chr = Funicode_to_char(make_int(ucs), Qnil); + assert (!NILP(chr)); + len = set_itext_ichar (work, XCHAR(chr)); + Dynarr_add_many (dst, work, len); +} + +#define DECODE_ERROR_OCTET(octet, dst) \ + decode_unicode_char ((octet) + UNICODE_ERROR_OCTET_RANGE_START, dst) + +static inline void +indicate_invalid_utf_8 (unsigned char indicated_length, + unsigned char counter, + int ch, unsigned_char_dynarr *dst) +{ + Binbyte stored = indicated_length - counter; + Binbyte mask = "\x00\x00\xC0\xE0\xF0\xF8\xFC"[indicated_length]; + + while (stored > 0) + { + DECODE_ERROR_OCTET (((ch >> (6 * (stored - 1))) & 0x3f) | mask, + dst); + mask = 0x80, stored--; + } +} + /* Convert ISO2022-format data to internal format. */ static Bytecount @@ -1907,9 +1941,7 @@ else if (flags & ISO_STATE_UTF_8) { unsigned char counter = data->counter; - Ibyte work[MAX_ICHAR_LEN]; - int len; - Lisp_Object chr; + unsigned char indicated_length = data->indicated_length; if (ISO_CODE_ESC == c) { @@ -1920,73 +1952,126 @@ continue; } - switch (counter) - { - case 0: - if (c >= 0xfc) - { - ch = c & 0x01; - counter = 5; - } - else if (c >= 0xf8) - { - ch = c & 0x03; - counter = 4; - } - else if (c >= 0xf0) - { - ch = c & 0x07; - counter = 3; - } - else if (c >= 0xe0) - { - ch = c & 0x0f; - counter = 2; - } - else if (c >= 0xc0) - { - ch = c & 0x1f; - counter = 1; - } - else - /* ASCII, or the lower control characters. - - Perhaps we should signal an error if the character is in - the range 0x80-0xc0; this is illegal UTF-8. */ - Dynarr_add (dst, (c & 0x7f)); - - break; - case 1: - ch = (ch << 6) | (c & 0x3f); - chr = Funicode_to_char(make_int(ch), Qnil); - - if (!NILP (chr)) - { - assert(CHARP(chr)); - len = set_itext_ichar (work, XCHAR(chr)); - Dynarr_add_many (dst, work, len); - } - else - { - /* Shouldn't happen, this code should only be enabled in - XEmacsen with support for all of Unicode. */ - Dynarr_add (dst, LEADING_BYTE_JAPANESE_JISX0208); - Dynarr_add (dst, 34 + 128); - Dynarr_add (dst, 46 + 128); - } - - ch = 0; - counter = 0; - break; - default: - ch = (ch << 6) | (c & 0x3f); - counter--; - } - - if (str->eof) - DECODE_OUTPUT_PARTIAL_CHAR (ch, dst); + if (0 == counter) + { + if (0 == (c & 0x80)) + { + /* ASCII. */ + decode_unicode_char (c, dst); + } + else if (0 == (c & 0x40)) + { + /* Highest bit set, second highest not--there's + something wrong. */ + DECODE_ERROR_OCTET (c, dst); + } + else if (0 == (c & 0x20)) + { + ch = c & 0x1f; + counter = 1; + indicated_length = 2; + } + else if (0 == (c & 0x10)) + { + ch = c & 0x0f; + counter = 2; + indicated_length = 3; + } + else if (0 == (c & 0x08)) + { + ch = c & 0x0f; + counter = 3; + indicated_length = 4; + } + /* We support lengths longer than 4 here, since we want to + represent UTF-8 error chars as distinct from the + corresponding ISO 8859-1 characters in escape-quoted. + + However, we can't differentiate UTF-8 error chars as + written to disk, and UTF-8 errors in escape-quoted. This + is not a big problem; + non-Unicode-chars-encoded-as-UTF-8-in-ISO-2022 is not + deployed, in practice, so if such a sequence of octets + occurs, XEmacs generated it. */ + else if (0 == (c & 0x04)) + { + ch = c & 0x03; + counter = 4; + indicated_length = 5; + } + else if (0 == (c & 0x02)) + { + ch = c & 0x01; + counter = 5; + indicated_length = 6; + } + else + { + /* #xFF is not a valid leading byte in any form of + UTF-8. */ + DECODE_ERROR_OCTET (c, dst); + + } + } + else + { + /* counter != 0 */ + if ((0 == (c & 0x80)) || (0 != (c & 0x40))) + { + indicate_invalid_utf_8(indicated_length, + counter, + ch, dst); + if (c & 0x80) + { + DECODE_ERROR_OCTET (c, dst); + } + else + { + /* The character just read is ASCII. Treat it as + such. */ + decode_unicode_char (c, dst); + } + ch = 0; + counter = 0; + } + else + { + ch = (ch << 6) | (c & 0x3f); + counter--; + + /* Just processed the final byte. Emit the character. */ + if (!counter) + { + /* Don't accept over-long sequences, or surrogates. */ + if ((ch < 0x80) || + ((ch < 0x800) && indicated_length > 2) || + ((ch < 0x10000) && indicated_length > 3) || + /* We accept values above #x110000 in + escape-quoted, though not in UTF-8. */ + /* (ch > 0x110000) || */ + valid_utf_16_surrogate(ch)) + { + indicate_invalid_utf_8(indicated_length, + counter, + ch, dst); + } + else + { + decode_unicode_char (ch, dst); + } + ch = 0; + } + } + } + + if (str->eof && ch) + { + DECODE_ERROR_OCTET (ch, dst); + ch = 0; + } data->counter = counter; + data->indicated_length = indicated_length; } else if (byte_c0_p (c) || byte_c1_p (c)) { /* Control characters */ diff -r 71bf2c5667ba -r 66411359ce4e src/nt.c --- a/src/nt.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/nt.c Sat Oct 25 21:40:46 2008 +0900 @@ -2063,7 +2063,7 @@ /* Some miscellaneous functions that are Windows specific, but not GUI specific (ie. are applicable in terminal or batch mode as well). */ -DEFUN ("mswindows-short-file-name", Fmswindows_short_file_name, 1, 1, "", /* +DEFUN ("mswindows-short-file-name", Fmswindows_short_file_name, 1, 1, 0, /* Return the short file name version (8.3) of the full path of FILENAME. If FILENAME does not exist, return nil. All path elements in FILENAME are converted to their short names. @@ -2092,7 +2092,7 @@ } -DEFUN ("mswindows-long-file-name", Fmswindows_long_file_name, 1, 1, "", /* +DEFUN ("mswindows-long-file-name", Fmswindows_long_file_name, 1, 1, 0, /* Return the long file name version of the full path of FILENAME. If FILENAME does not exist, return nil. All path elements in FILENAME are converted to their long names. diff -r 71bf2c5667ba -r 66411359ce4e src/objects-msw.c --- a/src/objects-msw.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/objects-msw.c Sat Oct 25 21:40:46 2008 +0900 @@ -1976,7 +1976,7 @@ const Ibyte *c; Bytecount the_length = length; - if (UNBOUNDP (charset)) + if (NILP (charset)) return 1; if (!the_nonreloc) @@ -2038,7 +2038,7 @@ Bytecount the_length = length; int i; - if (UNBOUNDP (charset)) + if (NILP (charset)) return 1; if (!the_nonreloc) diff -r 71bf2c5667ba -r 66411359ce4e src/objects-tty.c --- a/src/objects-tty.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/objects-tty.c Sat Oct 25 21:40:46 2008 +0900 @@ -221,10 +221,8 @@ static void tty_finalize_color_instance (Lisp_Color_Instance *c) { +#ifndef NEW_GC if (c->data) -#ifdef NEW_GC - mc_free (c->data); -#else /* not NEW_GC */ xfree (c->data, void *); #endif /* not NEW_GC */ } @@ -318,10 +316,8 @@ static void tty_finalize_font_instance (Lisp_Font_Instance *f) { +#ifndef NEW_GC if (f->data) -#ifdef NEW_GC - mc_free (f->data); -#else /* not NEW_GC */ xfree (f->data, void *); #endif /* not NEW_GC */ } @@ -351,7 +347,7 @@ fixup_internal_substring (nonreloc, reloc, offset, &length); the_nonreloc += offset; - if (UNBOUNDP (charset)) + if (NILP (charset)) return !memchr (the_nonreloc, '/', length); the_nonreloc = (const Ibyte *) memchr (the_nonreloc, '/', length); if (!the_nonreloc) @@ -378,12 +374,12 @@ if (strchr ((const char *) fontname, '/')) { if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0, - font, 0, -1, 0)) + font, 0, -1, initial)) return font; return Qnil; } - if (UNBOUNDP (charset)) + if (NILP (charset)) return font; return concat3 (font, build_string ("/"), diff -r 71bf2c5667ba -r 66411359ce4e src/objects-xlike-inc.c --- a/src/objects-xlike-inc.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/objects-xlike-inc.c Sat Oct 25 21:40:46 2008 +0900 @@ -61,7 +61,7 @@ const Ibyte *new_hyphening; for (hyphen_count = 0; - NULL != (new_hyphening = memchr((const void *)hyphening, '-', length)); + NULL != (new_hyphening = (Ibyte *) memchr((const void *)hyphening, '-', length)); hyphen_count++) { ++new_hyphening; @@ -125,7 +125,7 @@ #endif /* Hmm, this smells bad. */ - if (UNBOUNDP (charset)) + if (NILP (charset)) return 1; /* Hack! Short font names don't have the registry in them, @@ -358,7 +358,6 @@ { &Vcharset_latin_iso8859_9, NULL, NULL }, { &Vcharset_latin_iso8859_15, NULL, NULL }, { &Vcharset_thai_tis620, NULL, NULL }, - { &Vcharset_arabic_iso8859_6, NULL, NULL }, { &Vcharset_hebrew_iso8859_8, "Hebrew", "he" }, { &Vcharset_cyrillic_iso8859_5, NULL, NULL }, /* #### these probably are not quite right */ @@ -786,7 +785,7 @@ for (j = 0; j < registries_len; ++j) { if (0 == qxestrcasecmp(XSTRING_DATA(XVECTOR_DATA(registries)[j]), - FALLBACK_ASCII_REGISTRY)) + (Ibyte *) FALLBACK_ASCII_REGISTRY)) { have_latin1 = 1; break; diff -r 71bf2c5667ba -r 66411359ce4e src/objects.c --- a/src/objects.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/objects.c Sat Oct 25 21:40:46 2008 +0900 @@ -103,7 +103,7 @@ Lisp_Color_Instance *c = XCOLOR_INSTANCE (obj); if (print_readably) printing_unreadable_object ("#", - c->header.uid); + c->header.uid); write_fmt_string_lisp (printcharfun, "#name); write_fmt_string_lisp (printcharfun, " on %s", 1, c->device); if (!NILP (c->device)) /* Vthe_null_color_instance */ @@ -153,7 +153,7 @@ 0, /*dumpable-flag*/ mark_color_instance, print_color_instance, finalize_color_instance, color_instance_equal, - color_instance_hash, + color_instance_hash, color_instance_description, Lisp_Color_Instance); @@ -295,7 +295,7 @@ { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, truename)}, { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, device)}, { XD_LISP_OBJECT, offsetof (Lisp_Font_Instance, charset)}, - { XD_UNION, offsetof (Lisp_Font_Instance, data), + { XD_UNION, offsetof (Lisp_Font_Instance, data), XD_INDIRECT (0, 0), { &font_instance_data_description } }, { XD_END } }; @@ -596,7 +596,7 @@ static Lisp_Object color_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec), Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth) + Lisp_Object depth, int no_fallback) { /* When called, we're inside of call_with_suspended_errors(), so we can freely error. */ @@ -606,10 +606,10 @@ if (COLOR_INSTANCEP (instantiator)) { /* If we are on the same device then we're done. Otherwise change - the instantiator to the name used to generate the pixel and let the - STRINGP case deal with it. */ + the instantiator to the name used to generate the pixel and let the + STRINGP case deal with it. */ if (NILP (device) /* Vthe_null_color_instance */ - || EQ (device, XCOLOR_INSTANCE (instantiator)->device)) + || EQ (device, XCOLOR_INSTANCE (instantiator)->device)) return instantiator; else instantiator = Fcolor_instance_name (instantiator); @@ -647,13 +647,15 @@ instantiator); return (FACE_PROPERTY_INSTANCE_1 (Fget_face (XVECTOR_DATA (instantiator)[0]), - COLOR_SPECIFIER_FACE_PROPERTY (XCOLOR_SPECIFIER (specifier)), - domain, ERROR_ME, 0, depth)); + COLOR_SPECIFIER_FACE_PROPERTY + (XCOLOR_SPECIFIER (specifier)), + domain, ERROR_ME, no_fallback, depth)); case 2: return (FACE_PROPERTY_INSTANCE_1 (Fget_face (XVECTOR_DATA (instantiator)[0]), - XVECTOR_DATA (instantiator)[1], domain, ERROR_ME, 0, depth)); + XVECTOR_DATA (instantiator)[1], domain, ERROR_ME, + no_fallback, depth)); default: ABORT (); @@ -830,11 +832,11 @@ hash_table = Fgethash (charset, d->charset_font_cache_stage_1, Qunbound); if (!UNBOUNDP (hash_table)) - Fclrhash (hash_table); + Fclrhash (hash_table); hash_table = Fgethash (charset, d->charset_font_cache_stage_2, Qunbound); if (!UNBOUNDP (hash_table)) - Fclrhash (hash_table); + Fclrhash (hash_table); } } @@ -845,7 +847,7 @@ font_instantiate (Lisp_Object UNUSED (specifier), Lisp_Object USED_IF_MULE (matchspec), Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth) + Lisp_Object depth, int no_fallback) { /* When called, we're inside of call_with_suspended_errors(), so we can freely error. */ @@ -877,7 +879,7 @@ if (FONT_INSTANCEP (instantiator)) { if (NILP (device) - || EQ (device, XFONT_INSTANCE (instantiator)->device)) + || EQ (device, XFONT_INSTANCE (instantiator)->device)) { #ifdef MULE if (font_spec_matches_charset (d, charset, 0, @@ -895,7 +897,7 @@ #ifdef MULE /* #### rename these caches. */ Lisp_Object cache = stage ? d->charset_font_cache_stage_2 : - d->charset_font_cache_stage_1; + d->charset_font_cache_stage_1; #else Lisp_Object cache = d->font_instance_cache; #endif @@ -926,9 +928,9 @@ { /* make sure we cache the failures, too. */ matching_font = - DEVMETH_OR_GIVEN (d, find_charset_font, - (device, instantiator, charset, stage), - instantiator); + DEVMETH_OR_GIVEN (d, find_charset_font, + (device, instantiator, charset, stage), + instantiator); Fputhash (instantiator, matching_font, hash_table); } if (NILP (matching_font)) @@ -956,13 +958,13 @@ match_inst = face_property_matching_instance (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont, - charset, domain, ERROR_ME, 0, depth, initial); + charset, domain, ERROR_ME, no_fallback, depth, initial); - if (UNBOUNDP(match_inst)) + if (UNBOUNDP(match_inst)) { match_inst = face_property_matching_instance (Fget_face (XVECTOR_DATA (instantiator)[0]), Qfont, - charset, domain, ERROR_ME, 0, depth, final); + charset, domain, ERROR_ME, no_fallback, depth, final); } return match_inst; @@ -1067,7 +1069,7 @@ face_boolean_instantiate (Lisp_Object specifier, Lisp_Object UNUSED (matchspec), Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth) + Lisp_Object depth, int no_fallback) { /* When called, we're inside of call_with_suspended_errors(), so we can freely error. */ @@ -1094,7 +1096,7 @@ retval = (FACE_PROPERTY_INSTANCE_1 (Fget_face (XVECTOR_DATA (instantiator)[0]), - prop, domain, ERROR_ME, 0, depth)); + prop, domain, ERROR_ME, no_fallback, depth)); if (instantiator_len == 3 && !NILP (XVECTOR_DATA (instantiator)[2])) retval = NILP (retval) ? Qt : Qnil; diff -r 71bf2c5667ba -r 66411359ce4e src/print.c --- a/src/print.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/print.c Sat Oct 25 21:40:46 2008 +0900 @@ -867,6 +867,26 @@ return object; } +Lisp_Object +prin1_to_string (Lisp_Object object, int noescape) +{ + /* This function can GC */ + Lisp_Object result = Qnil; + Lisp_Object stream = make_resizing_buffer_output_stream (); + Lstream *str = XLSTREAM (stream); + /* gcpro OBJECT in case a caller forgot to do so */ + struct gcpro gcpro1, gcpro2, gcpro3; + GCPRO3 (object, stream, result); + + print_internal (object, stream, !noescape); + Lstream_flush (str); + UNGCPRO; + result = make_string (resizing_buffer_stream_ptr (str), + Lstream_byte_count (str)); + Lstream_delete (str); + return result; +} + DEFUN ("prin1-to-string", Fprin1_to_string, 1, 2, 0, /* Return a string containing the printed representation of OBJECT, any Lisp object. Quoting characters are used when needed to make output @@ -877,20 +897,11 @@ { /* This function can GC */ Lisp_Object result = Qnil; - Lisp_Object stream = make_resizing_buffer_output_stream (); - Lstream *str = XLSTREAM (stream); - /* gcpro OBJECT in case a caller forgot to do so */ - struct gcpro gcpro1, gcpro2, gcpro3; - GCPRO3 (object, stream, result); RESET_PRINT_GENSYM; - print_internal (object, stream, NILP (noescape)); + result = prin1_to_string (object, !(EQ(noescape, Qnil))); RESET_PRINT_GENSYM; - Lstream_flush (str); - UNGCPRO; - result = make_string (resizing_buffer_stream_ptr (str), - Lstream_byte_count (str)); - Lstream_delete (str); + return result; } @@ -1269,6 +1280,29 @@ #undef DIGITS_18 #undef DIGITS_19 +void +ulong_to_bit_string (char *p, unsigned long number) +{ + int i, seen_high_order = 0;; + + for (i = ((SIZEOF_LONG * 8) - 1); i >= 0; --i) + { + if (number & (unsigned long)1 << i) + { + seen_high_order = 1; + *p++ = '1'; + } + else + { + if (seen_high_order) + { + *p++ = '0'; + } + } + } + *p = '\0'; +} + static void print_vector_internal (const char *start, const char *end, Lisp_Object obj, diff -r 71bf2c5667ba -r 66411359ce4e src/process-unix.c --- a/src/process-unix.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/process-unix.c Sat Oct 25 21:40:46 2008 +0900 @@ -174,7 +174,7 @@ { /* This function can GC */ Lisp_Object proc; - int inch; + EMACS_INT inch; CHECK_STRING (name); CHECK_INT (infd); @@ -424,8 +424,8 @@ } static int -create_bidirectional_pipe (int *inchannel, int *outchannel, - volatile int *forkin, volatile int *forkout) +create_bidirectional_pipe (EMACS_INT *inchannel, EMACS_INT *outchannel, + volatile EMACS_INT *forkin, volatile EMACS_INT *forkout) { int sv[2]; @@ -846,8 +846,9 @@ unix_init_process_io_handles (Lisp_Process *p, void *in, void *UNUSED (out), void *err, int UNUSED (flags)) { - UNIX_DATA(p)->infd = (int) in; - UNIX_DATA(p)->errfd = (int) err; + /* if sizeof(EMACS_INT) > sizeof(int) this truncates the value */ + UNIX_DATA(p)->infd = (EMACS_INT) in; + UNIX_DATA(p)->errfd = (EMACS_INT) err; } /* Move the file descriptor FD so that its number is not less than MIN. * @@ -1054,13 +1055,13 @@ int separate_err) { int pid; - int inchannel = -1; - int outchannel = -1; - int errchannel = -1; + EMACS_INT inchannel = -1; + EMACS_INT outchannel = -1; + EMACS_INT errchannel = -1; /* Use volatile to protect variables from being clobbered by longjmp. */ - volatile int forkin = -1; - volatile int forkout = -1; - volatile int forkerr = -1; + volatile EMACS_INT forkin = -1; + volatile EMACS_INT forkout = -1; + volatile EMACS_INT forkerr = -1; volatile int pty_flag = 0; if (!NILP (Vprocess_connection_type)) @@ -1883,8 +1884,8 @@ Lisp_Object service, Lisp_Object protocol, void **vinfd, void **voutfd) { - int inch; - int outch; + EMACS_INT inch; + EMACS_INT outch; volatile int s = -1; volatile int port; volatile int retry = 0; @@ -2161,7 +2162,7 @@ struct ip_mreq imr; struct sockaddr_in sa; struct protoent *udp; - int ws, rs; + EMACS_INT ws, rs; int theport; unsigned char thettl; int one = 1; /* For REUSEADDR */ diff -r 71bf2c5667ba -r 66411359ce4e src/profile.h --- a/src/profile.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/profile.h Sat Oct 25 21:40:46 2008 +0900 @@ -47,11 +47,18 @@ This ensures correct behavior (e.g. we never modify the profiling info when profiling is not active) because we seed and reap all functions currently on the stack when starting and stopping. See - `start-profiling'. */ + `start-profiling'. + + We check do_backtrace to make sure that the backtrace structure is + initialised. If it isn't, we can enter a function with profiling turned + off, and exit it with it turned on, with the consequence that an + unitialised backtrace structure is passed to + profile_record_just_called. Since do_backtrace is function-local (apart + from in the garbage collector) this avoids that. */ #define PROFILE_ENTER_FUNCTION() \ do \ { \ - if (profiling_active) \ + if (profiling_active && do_backtrace) \ profile_record_about_to_call (&backtrace); \ } \ while (0) @@ -59,7 +66,7 @@ #define PROFILE_EXIT_FUNCTION() \ do \ { \ - if (profiling_active) \ + if (profiling_active && do_backtrace) \ profile_record_just_called (&backtrace); \ } \ while (0) diff -r 71bf2c5667ba -r 66411359ce4e src/rangetab.c --- a/src/rangetab.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/rangetab.c Sat Oct 25 21:40:46 2008 +0900 @@ -571,7 +571,8 @@ Results are guaranteed to be correct (i.e. each entry processed exactly once) if FUNCTION modifies or deletes the current entry \(i.e. passes the current range to `put-range-table' or -`remove-range-table'), but not otherwise. +`remove-range-table'). If FUNCTION modifies or deletes any other entry, +this guarantee doesn't hold. */ (function, range_table)) { diff -r 71bf2c5667ba -r 66411359ce4e src/redisplay-msw.c --- a/src/redisplay-msw.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/redisplay-msw.c Sat Oct 25 21:40:46 2008 +0900 @@ -148,6 +148,15 @@ Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset); SIZE size; + /* The X11 code doesn't have to do this explicitly, because there we trust + the font instance to know whether it's actually proportional or not, + and we use the zero width that is stored in the monospace null font + instance. */ + if (EQ (Vthe_null_font_instance, font_inst)) + { + return 0; + } + #if 0 /* #### not the way of ikeyama's ws */ if (!fi->proportional_p || !hdc) { diff -r 71bf2c5667ba -r 66411359ce4e src/redisplay-output.c --- a/src/redisplay-output.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/redisplay-output.c Sat Oct 25 21:40:46 2008 +0900 @@ -79,9 +79,9 @@ if (max_move) { /* #### Doing this directly breaks the encapsulation. But, the - running time of this function has a measurable impact on - redisplay performance so avoiding all excess overhead is a - good thing. Is all of this true? */ + running time of this function has a measurable impact on + redisplay performance so avoiding all excess overhead is a + good thing. Is all of this true? */ memcpy (cra->base, dra->base, sizeof (struct rune) * max_move); Dynarr_set_size (cra, max_move); } @@ -114,6 +114,9 @@ int db_elt; int local = 0; + /* #### NOTE: practically, this is not needed because of the memcpy below. + #### However, it's cleaner and bugs-in-the-future proof. -- dvl */ + DISPLAY_LINE_INIT (dl); dlp = Dynarr_atp (ddla, line); if (line >= Dynarr_largest (cdla)) { @@ -237,8 +240,8 @@ !EQ (crb->object.dglyph.extent, drb->object.dglyph.extent) || crb->object.dglyph.xoffset != drb->object.dglyph.xoffset || crb->object.dglyph.yoffset != drb->object.dglyph.yoffset || - crb->object.dglyph.ascent != drb->object.dglyph.ascent || - crb->object.dglyph.descent != drb->object.dglyph.descent)) + crb->object.dglyph.ascent != drb->object.dglyph.ascent || + crb->object.dglyph.descent != drb->object.dglyph.descent)) return 0; /* Only check dirtiness if we know something has changed. */ else if (crb->type == RUNE_DGLYPH && @@ -246,14 +249,14 @@ crb->findex != drb->findex)) { /* 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 (). */ + 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; window = wrap_window (w); @@ -340,16 +343,16 @@ image = glyph_image_instance (crb->object.dglyph.glyph, window, crb->object.dglyph.matchspec, ERROR_ME_DEBUG_WARN, 1); - + if (!IMAGE_INSTANCEP (image)) return 0; 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 for 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 @@ -366,7 +369,7 @@ 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.*/ @@ -540,12 +543,12 @@ if (f->windows_structure_changed || /* #### Why is this so? We have face cachels so that we don't - have to recalculate all the display blocks when faces - change. I have fixed this for glyphs and am inclined to think - that faces should "Just Work", but I'm not feeling brave - today. Maybe its because the face cachels represent merged - faces rather than simply instantiations in a particular - domain. */ + have to recalculate all the display blocks when faces + change. I have fixed this for glyphs and am inclined to think + that faces should "Just Work", but I'm not feeling brave + today. Maybe its because the face cachels represent merged + faces rather than simply instantiations in a particular + domain. */ f->faces_changed || cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || @@ -706,9 +709,9 @@ struct display_block *db; /* If the lines cursor parameter is not -1 then it indicates - which rune in the TEXT block contains the cursor. This means - that there must be at least one display block. The TEXT - block, if present, must always be the first display block. */ + which rune in the TEXT block contains the cursor. This means + that there must be at least one display block. The TEXT + block, if present, must always be the first display block. */ assert (Dynarr_length (ddba) != 0); db = Dynarr_atp (ddba, 0); @@ -727,7 +730,7 @@ if (ddl->modeline) { /* The shadow thickness check is necessary if only the sign of - the size changed. */ + the size changed. */ if (cdba && !w->shadow_thickness_changed) { must_sync |= compare_display_blocks (w, cdl, ddl, 0, 0, @@ -753,13 +756,13 @@ &next_start_pixpos); /* If we didn't find a block then we should blank the area - between start_pos and next_start if necessary. */ + between start_pos and next_start if necessary. */ if (block == NO_BLOCK) { /* We only erase those areas which were actually previously - covered by a display block unless the window structure - changed. In that case we clear all areas since the current - structures may actually represent a different buffer. */ + covered by a display block unless the window structure + changed. In that case we clear all areas since the current + structures may actually represent a different buffer. */ while (start_pixpos < next_start_pixpos) { int block_end; @@ -795,18 +798,19 @@ if (x < ddl->bounds.left_in) { - findex = ddl->left_margin_findex ? + findex = (ddl->left_margin_findex > DEFAULT_INDEX) ? ddl->left_margin_findex : get_builtin_face_cache_index (w, Vleft_margin_face); } else if (x < ddl->bounds.right_in) { - /* no check here because DEFAULT_INDEX == 0 anyway */ - findex = ddl->default_findex; + findex = (ddl->default_findex >= DEFAULT_INDEX) ? + ddl->default_findex + : DEFAULT_INDEX; } else if (x < ddl->bounds.right_out) { - findex = ddl->right_margin_findex ? + findex = (ddl->right_margin_findex > DEFAULT_INDEX) ? ddl->right_margin_findex : get_builtin_face_cache_index (w, Vright_margin_face); } @@ -852,7 +856,7 @@ ddb and output only the changed region. */ if (!force && cdb && ddb->type == cdb->type /* If there was no buffer being display before the - compare anyway as we might be outputting a gutter. */ + compare anyway as we might be outputting a gutter. */ && (b == old_b || !old_b)) { @@ -1452,15 +1456,15 @@ /* The bevel_area routines always draw in from the specified area so there is no need to adjust the displayed area to make sure that the lines are visible. */ - if (dga->xoffset >= 0) + if (dga->xoffset >= 0) edges |= EDGE_LEFT; - if (dga->width - dga->xoffset == layout_width) + if (dga->width - dga->xoffset == layout_width) edges |= EDGE_RIGHT; - if (dga->yoffset >= 0) + if (dga->yoffset >= 0) edges |= EDGE_TOP; if (dga->height - dga->yoffset == layout_height) edges |= EDGE_BOTTOM; - + if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_in)) style = EDGE_ETCHED_IN; else if (EQ (IMAGE_INSTANCE_LAYOUT_BORDER (p), Qetched_out)) @@ -1517,21 +1521,21 @@ 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. */ + /* Although normalization is done by the output routines we have to + do it here so that they don't try and clear all of db. This is + true below also. */ if (redisplay_normalize_glyph_area (&cdb, &cdga)) { redisplay_normalize_display_box (&cdb, &cdga); - /* Since the display boxes will now be totally in the - window if they are visible at all we can now check this easily. */ + /* Since the display boxes will now be totally in the window if + they are visible at all we can now check this easily. */ if (cdb.xpos < db->xpos || cdb.ypos < db->ypos || cdb.xpos + cdb.width > db->xpos + db->width || cdb.ypos + cdb.height > db->ypos + db->height) continue; - /* We have to invert the offset here as normalization - will have made them positive which the output - routines will treat as a truly +ve offset. */ + /* We have to invert the offset here as normalization will have + made them positive which the output routines will treat as a + truly +ve offset. */ cdga.xoffset = -cdga.xoffset; cdga.yoffset = -cdga.yoffset; @@ -1550,35 +1554,40 @@ Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (childii); unsigned char charsets[NUM_LEADING_BYTES]; - struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex); + struct face_cachel *cachel + = WINDOW_FACE_CACHEL (w, findex); + + DISPLAY_LINE_INIT (dl); find_charsets_in_ibyte_string (charsets, - XSTRING_DATA (string), - XSTRING_LENGTH (string)); + XSTRING_DATA (string), + XSTRING_LENGTH (string)); ensure_face_cachel_complete (cachel, window, charsets); convert_ibyte_string_into_ichar_dynarr - (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + (XSTRING_DATA (string), XSTRING_LENGTH (string), + buf); redisplay_normalize_display_box (&cdb, &cdga); /* Offsets are now +ve again so be careful when fixing up the display line. */ - xzero (dl); /* Munge boxes into display lines. */ dl.ypos = (cdb.ypos - cdga.yoffset) + glyph_ascent (child, image_instance); dl.ascent = glyph_ascent (child, image_instance); dl.descent = glyph_descent (child, image_instance); dl.top_clip = cdga.yoffset; - dl.clip = (dl.ypos + dl.descent) - (cdb.ypos + cdb.height); + dl.clip = (dl.ypos + dl.descent) + - (cdb.ypos + cdb.height); /* output_string doesn't understand offsets in the same way as other routines - we have to add the offset to the width so that we output the full string. */ - MAYBE_DEVMETH (d, output_string, (w, &dl, buf, cdb.xpos, - cdga.xoffset, cdb.xpos, - cdga.width + cdga.xoffset, - findex, 0, 0, 0, 0)); + MAYBE_DEVMETH (d, output_string, + (w, &dl, buf, cdb.xpos, + cdga.xoffset, cdb.xpos, + cdga.width + cdga.xoffset, + findex, 0, 0, 0, 0)); Dynarr_reset (buf); } } @@ -1650,7 +1659,7 @@ #ifdef DEBUG_REDISPLAY printf ("redisplay_output_pixmap(request) \ -[%dx%d@%d+%d] in [%dx%d@%d+%d]\n", +[%dx%d@%d+%d] in [%dx%d@%d+%d]\n", db->width, db->height, db->xpos, db->ypos, dga->width, dga->height, dga->xoffset, dga->yoffset); #endif @@ -1832,7 +1841,7 @@ int yoffset = (glyphsrc->yoffset > 0 ? glyphsrc->yoffset : 0); /* We need to make sure that subwindows are unmapped from the - whole area. */ + whole area. */ redisplay_unmap_subwindows_except_us (f, clear_x, dest->ypos, glyphsrc->width, dest->height, ignored_subwindow); @@ -1869,7 +1878,7 @@ xpos - absolute horizontal position of area. - ypos - absolute vertical position of area. + ypos - absolute vertical position of area. glyphsrc - display_glyph_area @@ -1926,7 +1935,7 @@ /* glyphsrc offset is -ve we are trying to display hard up against the dest corner inset into the glyphsrc by xoffset.*/ - else if (glyphsrc->xoffset < 0) + else if (glyphsrc->xoffset < 0) { glyphsrc->width += glyphsrc->xoffset; glyphsrc->width = min (glyphsrc->width, dest->width); @@ -1935,7 +1944,7 @@ glyphsrc->width = dest->width; } - else if (glyphsrc->xoffset < 0) + else if (glyphsrc->xoffset < 0) glyphsrc->width += glyphsrc->xoffset; /* Vertical offsets. This works because yoffset can be -ve as well as +ve */ @@ -1943,7 +1952,7 @@ { if ((glyphsrc->yoffset > 0) && (dest->height > glyphsrc->yoffset)) glyphsrc->height = dest->height - glyphsrc->yoffset; - else if (glyphsrc->yoffset < 0) + else if (glyphsrc->yoffset < 0) { glyphsrc->height += glyphsrc->yoffset; glyphsrc->height = min (glyphsrc->height, dest->height); @@ -2038,7 +2047,7 @@ int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, int xoffset, int yoffset, int start_pixpos, - int width, struct display_box* dest, + int width, struct display_box* dest, struct display_glyph_area* src) { dest->xpos = xpos; @@ -2055,13 +2064,13 @@ if (start_pixpos >=0 && start_pixpos > xpos) { /* Oops, we're asking for a start outside of the displayable - area. */ + area. */ if (start_pixpos > xpos + width) return 0; dest->xpos = start_pixpos; dest->width -= (start_pixpos - xpos); /* Offsets are -ve when we want to clip pixels off the displayed - glyph. */ + glyph. */ src->xoffset -= (start_pixpos - xpos); } @@ -2543,7 +2552,7 @@ end_y = min (WINDOW_BOTTOM (w), y + height); /* We do this to make sure that the 3D modelines get redrawn if - they are in the exposed region. */ + they are in the exposed region. */ orig_windows_structure_changed = f->windows_structure_changed; f->windows_structure_changed = 1; } diff -r 71bf2c5667ba -r 66411359ce4e src/redisplay.c --- a/src/redisplay.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/redisplay.c Sat Oct 25 21:40:46 2008 +0900 @@ -161,9 +161,9 @@ to be skipped before anything is displayed. */ Bytexpos byte_start_col_enabled; int start_col_xoffset; /* Number of pixels that still need to - be skipped. This is used for - horizontal scrolling of glyphs, where we want - to be able to scroll over part of the glyph. */ + be skipped. This is used for + horizontal scrolling of glyphs, where we want + to be able to scroll over part of the glyph. */ int hscroll_glyph_width_adjust; /* how much the width of the hscroll glyph differs from space_width (w). @@ -198,7 +198,7 @@ Charcount modeline_charpos; /* Number of chars used in result_str so far; corresponds to bytepos. */ Bytecount bytepos; /* Number of bytes used in result_str so far. - We don't actually copy the bytes into result_str + We don't actually copy the bytes into result_str until the end because we don't know how big the string is going to be until then. */ } pos_data; @@ -258,7 +258,7 @@ struct { /* Not used as yet, but could be used to wrap rather than clip glyphs. */ - int width; + int width; Lisp_Object glyph; } p_glyph; @@ -301,7 +301,7 @@ int no_regen); static int point_visible (struct window *w, Charbpos point, int type); static void calculate_yoffset (struct display_line *dl, - struct display_block *fixup); + struct display_block *fixup); static void calculate_baseline (pos_data *data); #ifdef ERROR_CHECK_DISPLAY @@ -320,7 +320,7 @@ (preempted = \ (!disable_preemption && \ ((preemption_count < max_preempts) || !NILP (Vexecuting_macro)) && \ - (!INTERACTIVE || \ + (!INTERACTIVE || \ detect_input_pending (QUEUED_EVENTS_REQUIRED_FOR_PREEMPTION))))) /* @@ -476,7 +476,7 @@ (`x', `gtk', `mswindows', and `tty' are supported -- yes, TTYs are window systems for this purpose. */ -Lisp_Object Vinitial_window_system; +Lisp_Object Vinitial_device_type; Lisp_Object Vglobal_mode_string; @@ -713,7 +713,7 @@ } /* There isn't an active block of the desired type, but there - might still be allocated blocks we need to reuse. */ + might still be allocated blocks we need to reuse. */ if (elt < Dynarr_largest (dl->display_blocks)) { struct display_block *dbp = Dynarr_atp (dl->display_blocks, elt); @@ -729,7 +729,7 @@ else { /* This line doesn't have any display blocks, so initialize the display - bock array. */ + bock array. */ dl->display_blocks = Dynarr_new (display_block); } @@ -847,11 +847,11 @@ { struct rune *r = Dynarr_atp (fixup->runes,i); if (r->type == RUNE_DGLYPH) - { - if (r->object.dglyph.ascent < dl->ascent) - r->object.dglyph.yoffset = dl->ascent - r->object.dglyph.ascent + + { + if (r->object.dglyph.ascent < dl->ascent) + r->object.dglyph.yoffset = dl->ascent - r->object.dglyph.ascent + r->object.dglyph.descent; - } + } } } @@ -897,11 +897,11 @@ if (!data->new_ascent && !data->new_descent) { /* We've got a blank line so initialize these values from the default - face. */ + face. */ default_face_font_info (data->window, &data->new_ascent, &data->new_descent, 0, 0, 0); } - + /* No automatically positioned glyphs? Return at once. */ if (!data->need_baseline_computation) return; @@ -913,7 +913,7 @@ { int default_font_ascent, default_font_descent, default_font_height; int scaled_default_font_ascent, scaled_default_font_descent; - + default_face_font_info (data->window, &default_font_ascent, &default_font_descent, &default_font_height, 0, 0); @@ -924,16 +924,16 @@ data->new_ascent = max (data->new_ascent, scaled_default_font_ascent); /* The ascent may have expanded now. Do we still need to grow the descent, - or are things big enough? - - The +1 caters for the baseline row itself. */ + or are things big enough? + + The +1 caters for the baseline row itself. */ if (data->max_pixmap_height > data->new_ascent + data->new_descent) - { - scaled_default_font_descent = (data->max_pixmap_height * + { + scaled_default_font_descent = (data->max_pixmap_height * default_font_descent / default_font_height) + 1; - data->new_descent = max (data->new_descent, scaled_default_font_descent); - } + data->new_descent = max (data->new_descent, scaled_default_font_descent); + } } } @@ -1127,7 +1127,7 @@ Ichar ch = data->font_is_bogus ? '~' : data->ch; data->last_char_width = - redisplay_text_width_ichar_string (XWINDOW (data->window), + redisplay_text_width_ichar_string (XWINDOW (data->window), data->findex, &ch, 1); } else @@ -1302,7 +1302,7 @@ prop_block_dynarr *retval; /* If we have still not fully scrolled horizontally, subtract - the width of this tab and return. */ + the width of this tab and return. */ if (char_tab_width < data->start_col) { data->start_col -= char_tab_width; @@ -1630,7 +1630,7 @@ comment sounds familiar. */ /* #### Still need to add any remaining elements to the - propagation information. */ + propagation information. */ if (prop) return prop; } @@ -1722,11 +1722,11 @@ XBUFFER (WINDOW_BUFFER (XWINDOW (data->window))); /* #### Chuck fix this shit or I'm gonna scream! */ if (byte_old_charpos > BYTE_BUF_BEGV (buf)) - data->byte_charpos = prev_bytebpos (buf, byte_old_charpos); - else + data->byte_charpos = prev_bytebpos (buf, byte_old_charpos); + else /* #### is this correct? Does anyone know? Does anyone care? Is this a cheesy hack or what? */ - data->byte_charpos = BYTE_BUF_BEGV (buf) - 1; + data->byte_charpos = BYTE_BUF_BEGV (buf) - 1; } } break; @@ -1747,12 +1747,12 @@ data->blank_width = data->max_pixpos - data->pixpos; /* We pass a bogus value of char_tab_width. It shouldn't - matter because unless something is really screwed up - this call won't cause that arg to be used. */ + matter because unless something is really screwed up + this call won't cause that arg to be used. */ add_failed = add_blank_rune (data, XWINDOW (data->window), 0); /* This can happen in the case where we have a tab which - is wider than the window. */ + is wider than the window. */ if (data->blank_width != pb->data.p_blank.width) { pb->data.p_blank.width -= data->blank_width; @@ -1841,8 +1841,8 @@ int glyph_char_width = width / space_width (w); /* If we still have not fully scrolled horizontally after - taking into account the width of the glyph, subtract its - width and return. */ + taking into account the width of the glyph, subtract its + width and return. */ if (glyph_char_width < data->start_col) { data->start_col -= glyph_char_width; @@ -1879,7 +1879,7 @@ than the window. We could alternatively just completely ignore the glyph and proceed from there but I think that this is a better solution. - + This does, however, create a different problem in that we can end up adding the object to every single line, never getting any further - for instance an extent with a long @@ -1901,7 +1901,7 @@ width = data->max_pixpos - data->pixpos; /* Add the glyph we are displaying, but clipping, to the propagation data so that we don't try and do it - again. */ + again. */ retval = Dynarr_new (prop_block); pb.type = PROP_GLYPH; pb.data.p_glyph.glyph = gb->glyph; @@ -1956,7 +1956,7 @@ data->new_ascent = max (data->new_ascent, pix_ascent); data->new_descent = max (data->new_descent, pix_descent); data->max_pixmap_height = max (data->max_pixmap_height, height); - + rb.object.dglyph.descent = pix_descent; } @@ -2001,7 +2001,7 @@ rb.endpos = bytebpos_to_charbpos (XBUFFER (WINDOW_BUFFER (w)), data->byte_endpos); else - rb.endpos = 0; + rb.endpos = 0; rb.type = RUNE_DGLYPH; rb.object.dglyph.glyph = gb->glyph; rb.object.dglyph.extent = gb->extent; @@ -2274,8 +2274,8 @@ } /* If selective display was an integer and we aren't working on - a continuation line then find the next line we are actually - supposed to display. */ + a continuation line then find the next line we are actually + supposed to display. */ if (selective > 0 && (data.byte_charpos == BYTE_BUF_BEGV (b) || BUF_FETCH_CHAR (b, prev_bytebpos (b, data.byte_charpos)) == '\n')) @@ -2304,7 +2304,7 @@ works because we always recalculate the extent-fragments for propagated data, we never actually propagate the fragments that still need to be displayed. */ - if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) + if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) { last_glyph = Dynarr_atp (*prop, 0)->data.p_glyph.glyph; Dynarr_free (*prop); @@ -2323,12 +2323,12 @@ initial = 0; /* Determine what is next to be displayed. We first handle any - glyphs returned by glyphs_at_charbpos. If there are no glyphs to - display then we determine what to do based on the character at the - current buffer position. */ + glyphs returned by glyphs_at_charbpos. If there are no glyphs to + display then we determine what to do based on the character at the + current buffer position. */ /* If the current position is covered by an invisible extent, do - nothing (except maybe add some ellipses). + nothing (except maybe add some ellipses). #### The behavior of begin and end-glyphs at the edge of an invisible extent should be investigated further. This is @@ -2365,7 +2365,7 @@ } /* If point is in an invisible region we place it on the - next visible character. */ + next visible character. */ if (data.cursor_type == CURSOR_ON && data.byte_charpos == data.byte_cursor_charpos) { @@ -2414,31 +2414,31 @@ /* #### I think this is safe, but could be wrong. */ data.ch = BYTE_BUF_FETCH_CHAR (b, data.byte_charpos); - if (Dynarr_length (data.ef->end_glyphs) > 0) + if (Dynarr_length (data.ef->end_glyphs) > 0) { *prop = add_glyph_runes (&data, END_GLYPHS); tmpglyphs = data.ef->end_glyphs; } /* If there are begin glyphs, add them to the line. */ - if (!*prop && Dynarr_length (data.ef->begin_glyphs) > 0) + if (!*prop && Dynarr_length (data.ef->begin_glyphs) > 0) { *prop = add_glyph_runes (&data, BEGIN_GLYPHS); tmpglyphs = data.ef->begin_glyphs; } - if (*prop) + if (*prop) { /* If we just clipped a glyph and we are at the end of a line and there are more glyphs to display then do appropriate processing to not get a continuation glyph. */ - if (*prop != ADD_FAILED + if (*prop != ADD_FAILED && Dynarr_atp (*prop, 0)->type == PROP_GLYPH && data.ch == '\n') - { + { /* If there are no more glyphs then do the normal - processing. + processing. #### This doesn't actually work if the same glyph is present more than once in the block. To solve @@ -2477,7 +2477,7 @@ entry = display_table_entry (data.ch, face_dt, window_dt); /* If there is a display table entry for it, hand it off to - add_disp_table_entry_runes and let it worry about it. */ + add_disp_table_entry_runes and let it worry about it. */ if (!NILP (entry) && !EQ (entry, make_char (data.ch))) { *prop = add_disp_table_entry_runes (&data, entry); @@ -2487,12 +2487,12 @@ } /* Check if we have hit a newline character. If so, add a marker - to the line and end this loop. */ + to the line and end this loop. */ else if (data.ch == '\n') { /* We aren't going to be adding an end glyph so give its - space back in order to make sure that the cursor can - fit. */ + space back in order to make sure that the cursor can + fit. */ data.max_pixpos += data.end_glyph_width; if (selective > 0 @@ -2520,10 +2520,10 @@ } /* We need to set data.byte_charpos to the start of the - next visible region in order to make this line - appear to contain all of the invisible area. - Otherwise, the line cache won't work - correctly. */ + next visible region in order to make this line + appear to contain all of the invisible area. + Otherwise, the line cache won't work + correctly. */ INC_BYTEBPOS (b, data.byte_charpos); while (byte_spaces_at_point (b, data.byte_charpos) >= selective) { @@ -2549,9 +2549,9 @@ } /* If the current character is ^M, and selective display is - enabled, then add the invisible-text-glyph if - selective-display-ellipses is set. In any case, this - line is done. */ + enabled, then add the invisible-text-glyph if + selective-display-ellipses is set. In any case, this + line is done. */ else if (data.ch == (('M' & 037)) && selective == -1) { Bytebpos byte_next_charpos; @@ -2564,7 +2564,7 @@ DEC_BYTEBPOS (b, byte_next_charpos); /* If the cursor is somewhere in the elided text make - sure that the cursor gets drawn appropriately. */ + sure that the cursor gets drawn appropriately. */ if (data.cursor_type == CURSOR_ON && (data.byte_cursor_charpos >= data.byte_charpos && data.byte_cursor_charpos < byte_next_charpos)) @@ -2573,14 +2573,14 @@ } /* We won't be adding a truncation or continuation glyph - so give up the room allocated for them. */ + so give up the room allocated for them. */ data.max_pixpos += data.end_glyph_width; if (!NILP (b->selective_display_ellipses)) { /* We don't propagate anything from the invisible - text glyph if it fails to fit. This is - intentional. */ + text glyph if it fails to fit. This is + intentional. */ struct glyph_block gb; gb.extent = Qnil; @@ -2590,16 +2590,16 @@ } /* Set the buffer position to the end of the line. We - need to do this before potentially adding a newline - so that the cursor flag will get set correctly (if - needed). */ + need to do this before potentially adding a newline + so that the cursor flag will get set correctly (if + needed). */ data.byte_charpos = byte_next_charpos; if (NILP (b->selective_display_ellipses) || data.byte_cursor_charpos == byte_next_charpos) { /* We have to at least add a newline character so - that the cursor shows up properly. */ + that the cursor shows up properly. */ data.ch = '\n'; data.blank_width = DEVMETH (d, eol_cursor_width, ()); data.findex = DEFAULT_INDEX; @@ -2611,15 +2611,15 @@ } /* This had better be a newline but doing it this way - we'll see obvious incorrect results if it isn't. No - need to abort here. */ + we'll see obvious incorrect results if it isn't. No + need to abort here. */ data.ch = BYTE_BUF_FETCH_CHAR (b, data.byte_charpos); goto done; } /* If the current character is considered to be printable, then - just add it. */ + just add it. */ else if (data.ch >= printable_min) { *prop = add_ichar_rune (&data); @@ -2628,8 +2628,8 @@ } /* If the current character is a tab, determine the next tab - starting position and add a blank rune which extends from the - current pixel position to that starting position. */ + starting position and add a blank rune which extends from the + current pixel position to that starting position. */ else if (data.ch == '\t') { int tab_start_pixpos = data.pixpos; @@ -2657,7 +2657,7 @@ *prop = add_blank_rune (&data, w, char_tab_width); /* add_blank_rune is only supposed to be called with - sizes guaranteed to fit in the available space. */ + sizes guaranteed to fit in the available space. */ assert (!(*prop)); if (prop_width) @@ -2675,7 +2675,7 @@ } /* If character is a control character, pass it off to - add_control_char_runes. + add_control_char_runes. The is_*() routines have undefined results on arguments outside of the range [-1, 255]. (This @@ -2691,7 +2691,7 @@ } /* If the character is above the ASCII range and we have not - already handled it, then print it as an octal number. */ + already handled it, then print it as an octal number. */ else if (data.ch >= 0200) { *prop = add_octal_runes (&data); @@ -2701,7 +2701,7 @@ } /* Assume the current character is considered to be printable, - then just add it. */ + then just add it. */ else { *prop = add_ichar_rune (&data); @@ -2729,14 +2729,14 @@ check. */ /* The common case is that the line ended because we hit a newline. - In that case, the next character is just the next buffer - position. */ + In that case, the next character is just the next buffer + position. */ if (data.ch == '\n') { /* If data.start_col_enabled is still true, then the window is - scrolled far enough so that nothing on this line is visible. - We need to stick a truncation glyph at the beginning of the - line in that case unless the line is completely blank. */ + scrolled far enough so that nothing on this line is visible. + We need to stick a truncation glyph at the beginning of the + line in that case unless the line is completely blank. */ if (data.byte_start_col_enabled) { if (data.cursor_type == CURSOR_ON) @@ -2761,7 +2761,7 @@ else { /* This duplicates code down below to add a newline to - the end of an otherwise empty line.*/ + the end of an otherwise empty line.*/ data.ch = '\n'; data.blank_width = DEVMETH (d, eol_cursor_width, ()); @@ -2773,16 +2773,16 @@ } /* Otherwise we have a buffer line which cannot fit on one display - line. */ + line. */ else { struct glyph_block gb; struct glyph_cachel *cachel; /* If the line is to be truncated then we actually have to look - for the next newline. We also add the end-of-line glyph which - we know will fit because we adjusted the right border before - we starting laying out the line. */ + for the next newline. We also add the end-of-line glyph which + we know will fit because we adjusted the right border before + we starting laying out the line. */ data.max_pixpos += data.end_glyph_width; data.findex = DEFAULT_INDEX; gb.extent = Qnil; @@ -2795,11 +2795,11 @@ byte_pos = byte_find_next_newline_no_quit (b, data.byte_charpos, 1); /* If the cursor is past the truncation line then we - make it appear on the truncation glyph. If we've hit - the end of the buffer then we also make the cursor - appear unless eob is immediately preceded by a - newline. In that case the cursor should actually - appear on the next line. */ + make it appear on the truncation glyph. If we've hit + the end of the buffer then we also make the cursor + appear unless eob is immediately preceded by a + newline. In that case the cursor should actually + appear on the next line. */ if (data.cursor_type == CURSOR_ON && data.byte_cursor_charpos >= data.byte_charpos && (data.byte_cursor_charpos < byte_pos || @@ -2839,9 +2839,9 @@ && (!echo_area_active (f) || data.byte_charpos == BYTE_BUF_ZV (b))) { /* We need to add a marker to the end of the line since there is no - newline character in order for the cursor to get drawn. We label - it as a newline so that it gets handled correctly by the - whitespace routines below. */ + newline character in order for the cursor to get drawn. We label + it as a newline so that it gets handled correctly by the + whitespace routines below. */ data.ch = '\n'; data.blank_width = DEVMETH (d, eol_cursor_width, ()); @@ -3026,12 +3026,12 @@ gb.extent = Qnil; add_glyph_rune (&data, &gb, BEGIN_GLYPHS, 0, 0); } - + if (data.max_pixmap_height) { int height = data.new_ascent + data.new_descent; int pix_ascent, pix_descent; - + pix_descent = data.max_pixmap_height * data.new_descent / height; pix_ascent = data.max_pixmap_height - pix_descent; calculate_baseline (&data); @@ -3271,13 +3271,13 @@ int width = Dynarr_atp (ib, marker)->width; /* If everything now fits in the available inside margin - space, we're done. */ + space, we're done. */ if (used_in <= avail_in) done = 1; else { /* Otherwise see if we have room to move a glyph to the - outside. */ + outside. */ if (used_out + width <= avail_out) { used_out += width; @@ -3377,8 +3377,8 @@ odb = get_display_block_from_line (dl, LEFT_OUTSIDE_MARGIN); odb->start_pos = dl->bounds.left_out; /* #### We should stop adding a blank to account for the space - between the end of the glyphs and the margin and instead set - this accordingly. */ + between the end of the glyphs and the margin and instead set + this accordingly. */ odb->end_pos = dl->bounds.left_in; Dynarr_reset (odb->runes); } @@ -3585,13 +3585,13 @@ int width = Dynarr_atp (ib, marker)->width; /* If everything now fits in the available inside margin - space, we're done. */ + space, we're done. */ if (used_in <= avail_in) done = 1; else { /* Otherwise see if we have room to move a glyph to the - outside. */ + outside. */ if (used_out + width <= avail_out) { used_out += width; @@ -3688,7 +3688,7 @@ { odb = get_display_block_from_line (dl, RIGHT_OUTSIDE_MARGIN); /* #### See comments before odb->start_pos init in - create_left_glyph_block */ + create_left_glyph_block */ odb->start_pos = dl->bounds.right_in; odb->end_pos = dl->bounds.right_out; Dynarr_reset (odb->runes); @@ -3701,7 +3701,7 @@ idb = get_display_block_from_line (dl, RIGHT_INSIDE_MARGIN); idb->start_pos = dl->bounds.right_white; /* #### See comments before odb->start_pos init in - create_left_glyph_block */ + create_left_glyph_block */ idb->end_pos = dl->bounds.right_in; Dynarr_reset (idb->runes); } @@ -3785,9 +3785,9 @@ /* This function is also used in frame.c by `generate_title_string' */ void generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str, - struct window *w, struct display_line *dl, - struct display_block *db, face_index findex, - int min_pixpos, int max_pixpos, int type) + struct window *w, struct display_line *dl, + struct display_block *db, face_index findex, + int min_pixpos, int max_pixpos, int type) { struct frame *f = XFRAME (w->frame); struct device *d = XDEVICE (f->device); @@ -3821,13 +3821,13 @@ if (! NILP (result_str)) offset = w->modeline_hscroll; generate_fstring_runes (w, &data, 0, 0, -1, format_str, 0, - max_pixpos - min_pixpos, findex, type, &offset, + max_pixpos - min_pixpos, findex, type, &offset, Qnil); if (Dynarr_length (db->runes)) { struct rune *rb = - Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1); + Dynarr_atp (db->runes, Dynarr_length (db->runes) - 1); c_pixpos = rb->xpos + rb->width; } else @@ -3859,44 +3859,44 @@ sledgehammer_check_ascii_begin (result_str); detach_all_extents (result_str); resize_string (result_str, -1, - data.bytepos - XSTRING_LENGTH (result_str)); + data.bytepos - XSTRING_LENGTH (result_str)); strdata = XSTRING_DATA (result_str); for (elt = 0, len = 0; elt < Dynarr_length (db->runes); elt++) - { - if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) - { - len += (set_itext_ichar - (strdata + len, Dynarr_atp (db->runes, - elt)->object.chr.ch)); - } - } + { + if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) + { + len += (set_itext_ichar + (strdata + len, Dynarr_atp (db->runes, + elt)->object.chr.ch)); + } + } init_string_ascii_begin (result_str); bump_string_modiff (result_str); sledgehammer_check_ascii_begin (result_str); for (elt = 0; elt < Dynarr_length (formatted_string_extent_dynarr); - elt++) - { - Lisp_Object extent = Qnil; - Lisp_Object child; - - extent = wrap_extent (Dynarr_at (formatted_string_extent_dynarr, elt)); - child = Fgethash (extent, buf->modeline_extent_table, Qnil); - if (NILP (child)) - { - child = Fmake_extent (Qnil, Qnil, result_str); - Fputhash (extent, child, buf->modeline_extent_table); - } - Fset_extent_parent (child, extent); - set_extent_endpoints - (XEXTENT (child), - Dynarr_at (formatted_string_extent_start_dynarr, elt), - Dynarr_at (formatted_string_extent_end_dynarr, elt), - result_str); - } + elt++) + { + Lisp_Object extent = Qnil; + Lisp_Object child; + + extent = wrap_extent (Dynarr_at (formatted_string_extent_dynarr, elt)); + child = Fgethash (extent, buf->modeline_extent_table, Qnil); + if (NILP (child)) + { + child = Fmake_extent (Qnil, Qnil, result_str); + Fputhash (extent, child, buf->modeline_extent_table); + } + Fset_extent_parent (child, extent); + set_extent_endpoints + (XEXTENT (child), + Dynarr_at (formatted_string_extent_start_dynarr, elt), + Dynarr_at (formatted_string_extent_end_dynarr, elt), + result_str); + } in_modeline_generation = 0; } @@ -3999,7 +3999,7 @@ static Charcount add_string_to_fstring_db_runes (pos_data *data, const Ibyte *str, - Charcount pos, Charcount min_pos, + Charcount pos, Charcount min_pos, Charcount max_pos) { /* This function has been Mule-ized. */ @@ -4012,7 +4012,7 @@ add_blank_rune (data, NULL, 0); end = (Dynarr_length (db->runes) + - bytecount_to_charcount (str, strlen ((const char *) str))); + bytecount_to_charcount (str, strlen ((const char *) str))); if (max_pos != -1) end = min (max_pos, end); @@ -4025,15 +4025,15 @@ succeeded = (add_ichar_rune (data) != ADD_FAILED); INC_IBYTEPTR (cur_pos); if (succeeded) - { - pos++; - data->modeline_charpos++; - data->bytepos += cur_pos - old_cur_pos; - } + { + pos++; + data->modeline_charpos++; + data->bytepos += cur_pos - old_cur_pos; + } } while (Dynarr_length (db->runes) < min_pos && - (data->pixpos + data->blank_width <= data->max_pixpos)) + (data->pixpos + data->blank_width <= data->max_pixpos)) add_blank_rune (data, NULL, 0); return Dynarr_length (db->runes); @@ -4043,7 +4043,7 @@ modeline extents. */ static Charcount add_glyph_to_fstring_db_runes (pos_data *data, Lisp_Object glyph, - Charcount pos, Charcount UNUSED (min_pos), + Charcount pos, Charcount UNUSED (min_pos), Charcount max_pos, Lisp_Object extent) { /* This function has been Mule-ized. */ @@ -4065,7 +4065,7 @@ pos++; while (Dynarr_length (db->runes) < pos && - (data->pixpos + data->blank_width <= data->max_pixpos)) + (data->pixpos + data->blank_width <= data->max_pixpos)) add_blank_rune (data, NULL, 0); return Dynarr_length (db->runes); @@ -4085,9 +4085,9 @@ modeline. */ static Charcount generate_fstring_runes (struct window *w, pos_data *data, Charcount pos, - Charcount min_pos, Charcount max_pos, - Lisp_Object elt, int depth, int max_pixsize, - face_index findex, int type, Charcount *offset, + Charcount min_pos, Charcount max_pos, + Lisp_Object elt, int depth, int max_pixsize, + face_index findex, int type, Charcount *offset, Lisp_Object cur_ext) { /* This function has been Mule-ized. */ @@ -4095,7 +4095,7 @@ -- C zero-terminated-string lossage. -- Non-printable characters should be converted into something - appropriate (e.g. ^F) instead of blindly being printed anyway. + appropriate (e.g. ^F) instead of blindly being printed anyway. */ tail_recurse: @@ -4107,21 +4107,21 @@ if (STRINGP (elt)) { /* A string. Add to the display line and check for %-constructs - within it. */ + within it. */ Ibyte *this_str = XSTRING_DATA (elt); while ((pos < max_pos || max_pos == -1) && *this_str) - { - Ibyte *last = this_str; - - while (*this_str && *this_str != '%') - this_str++; - - if (this_str != last) - { - /* No %-construct */ - Charcount size = + { + Ibyte *last = this_str; + + while (*this_str && *this_str != '%') + this_str++; + + if (this_str != last) + { + /* No %-construct */ + Charcount size = bytecount_to_charcount (last, this_str - last); if (size <= *offset) @@ -4136,72 +4136,72 @@ pos, pos, tmp_max); *offset = 0; } - } - else /* *this_str == '%' */ - { - Charcount spec_width = 0; - - this_str++; /* skip over '%' */ - - /* We can't allow -ve args due to the "%-" construct. - * Argument specifies minwidth but not maxwidth - * (maxwidth can be specified by - * ( . ) modeline elements) - */ - while (isdigit (*this_str)) - { - spec_width = spec_width * 10 + (*this_str - '0'); - this_str++; - } - spec_width += pos; - - if (*this_str == 'M') - { - pos = generate_fstring_runes (w, data, pos, spec_width, - max_pos, Vglobal_mode_string, - depth, max_pixsize, findex, - type, offset, cur_ext); - } - else if (*this_str == '-') - { - Charcount num_to_add; - - if (max_pixsize < 0) - num_to_add = 0; - else if (max_pos != -1) - num_to_add = max_pos - pos; - else - { - int cur_pixsize; - int dash_pixsize; - Ibyte ch = '-'; - SET_CURRENT_MODE_CHARS_PIXSIZE; - - dash_pixsize = - redisplay_text_width_string (w, findex, &ch, Qnil, 0, - 1); - - if (dash_pixsize == 0) + } + else /* *this_str == '%' */ + { + Charcount spec_width = 0; + + this_str++; /* skip over '%' */ + + /* We can't allow -ve args due to the "%-" construct. + * Argument specifies minwidth but not maxwidth + * (maxwidth can be specified by + * ( . ) modeline elements) + */ + while (isdigit (*this_str)) + { + spec_width = spec_width * 10 + (*this_str - '0'); + this_str++; + } + spec_width += pos; + + if (*this_str == 'M') + { + pos = generate_fstring_runes (w, data, pos, spec_width, + max_pos, Vglobal_mode_string, + depth, max_pixsize, findex, + type, offset, cur_ext); + } + else if (*this_str == '-') + { + Charcount num_to_add; + + if (max_pixsize < 0) + num_to_add = 0; + else if (max_pos != -1) + num_to_add = max_pos - pos; + else + { + int cur_pixsize; + int dash_pixsize; + Ibyte ch = '-'; + SET_CURRENT_MODE_CHARS_PIXSIZE; + + dash_pixsize = + redisplay_text_width_string (w, findex, &ch, Qnil, 0, + 1); + + if (dash_pixsize == 0) num_to_add = 0; else { num_to_add = (max_pixsize - cur_pixsize) / dash_pixsize; num_to_add++; } - } - - while (num_to_add--) - pos = add_string_to_fstring_db_runes - (data, (const Ibyte *) "-", pos, pos, max_pos); - } - else if (*this_str != 0) - { - Ichar ch = itext_ichar (this_str); - Ibyte *str; + } + + while (num_to_add--) + pos = add_string_to_fstring_db_runes + (data, (const Ibyte *) "-", pos, pos, max_pos); + } + else if (*this_str != 0) + { + Ichar ch = itext_ichar (this_str); + Ibyte *str; Charcount size; - decode_mode_spec (w, ch, type); - - str = Dynarr_atp (mode_spec_ibyte_string, 0); + decode_mode_spec (w, ch, type); + + str = Dynarr_atp (mode_spec_ibyte_string, 0); size = bytecount_to_charcount /* Skip the null character added by `decode_mode_spec' */ (str, Dynarr_length (mode_spec_ibyte_string)) - 1; @@ -4220,35 +4220,35 @@ max_pos); *offset = 0; } - } - - /* NOT this_str++. There could be any sort of character at - the current position. */ - INC_IBYTEPTR (this_str); - } - - if (max_pixsize > 0) - { - int cur_pixsize; - SET_CURRENT_MODE_CHARS_PIXSIZE; - - if (cur_pixsize >= max_pixsize) - break; - } - } + } + + /* NOT this_str++. There could be any sort of character at + the current position. */ + INC_IBYTEPTR (this_str); + } + + if (max_pixsize > 0) + { + int cur_pixsize; + SET_CURRENT_MODE_CHARS_PIXSIZE; + + if (cur_pixsize >= max_pixsize) + break; + } + } } else if (SYMBOLP (elt)) { /* A symbol: process the value of the symbol recursively - as if it appeared here directly. */ + as if it appeared here directly. */ Lisp_Object tem = symbol_value_in_buffer (elt, w->buffer); if (!UNBOUNDP (tem)) - { + { /* If value is a string, output that string literally: - don't check for % within it. */ - if (STRINGP (tem)) - { + don't check for % within it. */ + if (STRINGP (tem)) + { Ibyte *str = XSTRING_DATA (tem); Charcount size = string_char_length (tem); @@ -4265,14 +4265,14 @@ min_pos, max_pos); *offset = 0; } - } - /* Give up right away for nil or t. */ - else if (!EQ (tem, elt)) - { - elt = tem; - goto tail_recurse; - } - } + } + /* Give up right away for nil or t. */ + else if (!EQ (tem, elt)) + { + elt = tem; + goto tail_recurse; + } + } } else if (GENERIC_SPECIFIERP (elt)) { @@ -4341,97 +4341,97 @@ } } else if (INTP (car)) - { - Charcount lim = XINT (car); - - elt = XCDR (elt); - - if (lim < 0) - { - /* Negative int means reduce maximum width. - * DO NOT change MIN_PIXPOS here! - * (20 -10 . foo) should truncate foo to 10 col - * and then pad to 20. - */ - if (max_pos == -1) - max_pos = pos - lim; - else - max_pos = min (max_pos, pos - lim); - } - else if (lim > 0) - { - /* Padding specified. Don't let it be more than - * current maximum. - */ - lim += pos; - if (max_pos != -1 && lim > max_pos) - lim = max_pos; - /* If that's more padding than already wanted, queue it. - * But don't reduce padding already specified even if - * that is beyond the current truncation point. - */ - if (lim > min_pos) - min_pos = lim; - } - goto tail_recurse; - } + { + Charcount lim = XINT (car); + + elt = XCDR (elt); + + if (lim < 0) + { + /* Negative int means reduce maximum width. + * DO NOT change MIN_PIXPOS here! + * (20 -10 . foo) should truncate foo to 10 col + * and then pad to 20. + */ + if (max_pos == -1) + max_pos = pos - lim; + else + max_pos = min (max_pos, pos - lim); + } + else if (lim > 0) + { + /* Padding specified. Don't let it be more than + * current maximum. + */ + lim += pos; + if (max_pos != -1 && lim > max_pos) + lim = max_pos; + /* If that's more padding than already wanted, queue it. + * But don't reduce padding already specified even if + * that is beyond the current truncation point. + */ + if (lim > min_pos) + min_pos = lim; + } + goto tail_recurse; + } else if (STRINGP (car) || CONSP (car)) - { - int limit = 50; - - /* LIMIT is to protect against circular lists. */ - while (CONSP (elt) && --limit > 0 - && (pos < max_pos || max_pos == -1)) - { - pos = generate_fstring_runes (w, data, pos, pos, max_pos, - XCAR (elt), depth, max_pixsize, + { + int limit = 50; + + /* LIMIT is to protect against circular lists. */ + while (CONSP (elt) && --limit > 0 + && (pos < max_pos || max_pos == -1)) + { + pos = generate_fstring_runes (w, data, pos, pos, max_pos, + XCAR (elt), depth, max_pixsize, findex, type, offset, cur_ext); - elt = XCDR (elt); - } - } + elt = XCDR (elt); + } + } else if (EXTENTP (car)) - { - struct extent *ext = XEXTENT (car); - - if (EXTENT_LIVE_P (ext)) - { - face_index old_findex = data->findex; - Lisp_Object face; - Lisp_Object font_inst; - face_index new_findex; - Bytecount start = data->bytepos; - - face = extent_face (ext); - if (FACEP (face)) - { - /* #### needs to merge faces, sigh */ - /* #### needs to handle list of faces */ - new_findex = get_builtin_face_cache_index (w, face); - /* !!#### not right; needs to compute the max height of - all the charsets */ - font_inst = WINDOW_FACE_CACHEL_FONT (w, new_findex, - Vcharset_ascii); - - data->dl->ascent = max (data->dl->ascent, - XFONT_INSTANCE (font_inst)->ascent); - data->dl->descent = max (data->dl->descent, - XFONT_INSTANCE (font_inst)-> - descent); - } - else - new_findex = old_findex; - - data->findex = new_findex; - pos = generate_fstring_runes (w, data, pos, pos, max_pos, - XCDR (elt), depth - 1, + { + struct extent *ext = XEXTENT (car); + + if (EXTENT_LIVE_P (ext)) + { + face_index old_findex = data->findex; + Lisp_Object face; + Lisp_Object font_inst; + face_index new_findex; + Bytecount start = data->bytepos; + + face = extent_face (ext); + if (FACEP (face)) + { + /* #### needs to merge faces, sigh */ + /* #### needs to handle list of faces */ + new_findex = get_builtin_face_cache_index (w, face); + /* !!#### not right; needs to compute the max height of + all the charsets */ + font_inst = WINDOW_FACE_CACHEL_FONT (w, new_findex, + Vcharset_ascii); + + data->dl->ascent = max (data->dl->ascent, + XFONT_INSTANCE (font_inst)->ascent); + data->dl->descent = max (data->dl->descent, + XFONT_INSTANCE (font_inst)-> + descent); + } + else + new_findex = old_findex; + + data->findex = new_findex; + pos = generate_fstring_runes (w, data, pos, pos, max_pos, + XCDR (elt), depth - 1, max_pixsize, new_findex, type, offset, car); - data->findex = old_findex; - Dynarr_add (formatted_string_extent_dynarr, ext); - Dynarr_add (formatted_string_extent_start_dynarr, start); - Dynarr_add (formatted_string_extent_end_dynarr, data->bytepos); - } - } + data->findex = old_findex; + Dynarr_add (formatted_string_extent_dynarr, ext); + Dynarr_add (formatted_string_extent_start_dynarr, start); + Dynarr_add (formatted_string_extent_end_dynarr, data->bytepos); + } + } } else if (GLYPHP (elt)) { @@ -4520,8 +4520,8 @@ dla = window_display_lines (w, type); /* We don't care if there is a display line which is not - currently a modeline because it is definitely going to become - one if we have gotten to this point. */ + currently a modeline because it is definitely going to become + one if we have gotten to this point. */ if (Dynarr_length (dla) == 0) { if (Dynarr_largest (dla) > 0) @@ -4529,14 +4529,15 @@ else { struct display_line modeline; - xzero (modeline); + + DISPLAY_LINE_INIT (modeline); Dynarr_add (dla, modeline); } } /* If we're adding a new place marker go ahead and generate the - modeline so that it is available for use by - window_modeline_height. */ + modeline so that it is available for use by + window_modeline_height. */ generate_modeline (w, Dynarr_atp (dla, 0), type); } @@ -4653,7 +4654,7 @@ extended characters show up as hex with a display table like this: - #s(range-table data ((256 524288) (format "%x"))) + #s(range-table data ((256 524288) (format "%x"))) Since more than one display table is possible, you have great flexibility in mapping ranges of characters. */ @@ -4680,10 +4681,9 @@ dl->num_chars = 0; dl->line_continuation = 0; - /* set up faces to use for clearing areas, used by - output_display_line */ + /* Set up faces to use for clearing areas, used by output_display_line. */ dl->default_findex = default_face; - if (default_face) + if (default_face > DEFAULT_INDEX) { dl->left_margin_findex = default_face; dl->right_margin_findex = default_face; @@ -4774,7 +4774,7 @@ { Lisp_Object last_glyph = Qnil; /* Deal with clipped glyphs that we have already displayed. */ - if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) + if (*prop && Dynarr_atp (*prop, 0)->type == PROP_GLYPH) { last_glyph = Dynarr_atp (*prop, 0)->data.p_glyph.glyph; Dynarr_free (*prop); @@ -4783,10 +4783,10 @@ /* Now compute the face and begin/end-glyph information. */ data.findex = /* Remember that the extent-fragment routines deal in - Bytexpos's. */ + Bytexpos's. */ extent_fragment_update (w, data.ef, data.byte_charpos, last_glyph); /* This is somewhat cheesy but the alternative is to - propagate default_face into extent_fragment_update. */ + propagate default_face into extent_fragment_update. */ if (data.findex == DEFAULT_INDEX) data.findex = default_face; @@ -4798,12 +4798,12 @@ initial = 0; /* Determine what is next to be displayed. We first handle any - glyphs returned by glyphs_at_charbpos. If there are no glyphs to - display then we determine what to do based on the character at the - current buffer position. */ + glyphs returned by glyphs_at_charbpos. If there are no glyphs to + display then we determine what to do based on the character at the + current buffer position. */ /* If the current position is covered by an invisible extent, do - nothing (except maybe add some ellipses). + nothing (except maybe add some ellipses). #### The behavior of begin and end-glyphs at the edge of an invisible extent should be investigated further. This is @@ -4850,9 +4850,9 @@ } /* If there is propagation data, then it represents the current - buffer position being displayed. Add them and advance the - position counter. This might also add the minibuffer - prompt. */ + buffer position being displayed. Add them and advance the + position counter. This might also add the minibuffer + prompt. */ else if (*prop) { dl->used_prop_data = 1; @@ -4910,7 +4910,7 @@ entry = display_table_entry (data.ch, face_dt, window_dt); /* If there is a display table entry for it, hand it off to - add_disp_table_entry_runes and let it worry about it. */ + add_disp_table_entry_runes and let it worry about it. */ if (!NILP (entry) && !EQ (entry, make_char (data.ch))) { *prop = add_disp_table_entry_runes (&data, entry); @@ -4920,18 +4920,18 @@ } /* Check if we have hit a newline character. If so, add a marker - to the line and end this loop. */ + to the line and end this loop. */ else if (data.ch == '\n') { /* We aren't going to be adding an end glyph so give its - space back in order to make sure that the cursor can - fit. */ + space back in order to make sure that the cursor can + fit. */ data.max_pixpos += data.end_glyph_width; goto done; } /* If the current character is considered to be printable, then - just add it. */ + just add it. */ else if (data.ch >= printable_min) { *prop = add_ichar_rune (&data); @@ -4940,8 +4940,8 @@ } /* If the current character is a tab, determine the next tab - starting position and add a blank rune which extends from the - current pixel position to that starting position. */ + starting position and add a blank rune which extends from the + current pixel position to that starting position. */ else if (data.ch == '\t') { int tab_start_pixpos = data.pixpos; @@ -4986,7 +4986,7 @@ } /* If character is a control character, pass it off to - add_control_char_runes. + add_control_char_runes. The is_*() routines have undefined results on arguments outside of the range [-1, 255]. (This @@ -5002,7 +5002,7 @@ } /* If the character is above the ASCII range and we have not - already handled it, then print it as an octal number. */ + already handled it, then print it as an octal number. */ else if (data.ch >= 0200) { *prop = add_octal_runes (&data); @@ -5012,7 +5012,7 @@ } /* Assume the current character is considered to be printable, - then just add it. */ + then just add it. */ else { *prop = add_ichar_rune (&data); @@ -5039,24 +5039,24 @@ check. */ /* The common case is that the line ended because we hit a newline. - In that case, the next character is just the next buffer - position. */ + In that case, the next character is just the next buffer + position. */ if (data.ch == '\n') { INC_BYTECOUNT (XSTRING_DATA (disp_string), data.byte_charpos); } /* Otherwise we have a buffer line which cannot fit on one display - line. */ + line. */ else { struct glyph_block gb; struct glyph_cachel *cachel; /* If the line is to be truncated then we actually have to look - for the next newline. We also add the end-of-line glyph which - we know will fit because we adjusted the right border before - we starting laying out the line. */ + for the next newline. We also add the end-of-line glyph which + we know will fit because we adjusted the right border before + we starting laying out the line. */ data.max_pixpos += data.end_glyph_width; data.findex = default_face; gb.extent = Qnil; @@ -5356,8 +5356,7 @@ } else { - - xzero (dl); + DISPLAY_LINE_INIT (dl); dlp = &dl; local = 1; } @@ -5369,8 +5368,8 @@ &prop, default_face); Dynarr_unlock (dla); /* we need to make sure that we continue along the line if there - is more left to display otherwise we just end up redisplaying - the same chunk over and over again. */ + is more left to display otherwise we just end up redisplaying + the same chunk over and over again. */ if (next_pos == start_pos && next_pos < s_zv) start_pos++; else @@ -5396,8 +5395,12 @@ else dlp->clip = 0; - assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); - Dynarr_add (dla, *dlp); + if (pos_of_dlp < 0) + Dynarr_add (dla, *dlp); + else if (pos_of_dlp == Dynarr_length (dla)) + Dynarr_increment (dla); + else + ABORT (); /* #### This type of check needs to be done down in the generate_display_line call. */ @@ -5524,8 +5527,7 @@ } else { - - xzero (dl); + DISPLAY_LINE_INIT (dl); dlp = &dl; local = 1; } @@ -5547,7 +5549,7 @@ ypos = dlp->ypos + dlp->descent; /* See if we've been asked to start midway through a line, for - partial display line scrolling. */ + partial display line scrolling. */ if (yclip) { dlp->top_clip = yclip; @@ -5579,8 +5581,8 @@ if (dlp->cursor_elt != -1) { /* #### This check is steaming crap. Have to get things - fixed so when create_text_block hits EOB, we're done, - period. */ + fixed so when create_text_block hits EOB, we're done, + period. */ if (w->last_point_x[type] == -1) { w->last_point_x[type] = dlp->cursor_elt; @@ -5589,7 +5591,7 @@ else { /* #### This means that we've added a cursor at EOB - twice. Yuck oh yuck. */ + twice. Yuck oh yuck. */ struct display_block *db; Dynarr_lock (dla); @@ -5604,8 +5606,12 @@ if (dlp->num_chars > w->max_line_len) w->max_line_len = dlp->num_chars; - assert (pos_of_dlp < 0 || pos_of_dlp == Dynarr_length (dla)); - Dynarr_add (dla, *dlp); + if (pos_of_dlp < 0) + Dynarr_add (dla, *dlp); + else if (pos_of_dlp == Dynarr_length (dla)) + Dynarr_increment (dla); + else + ABORT (); /* #### This isn't right, but it is close enough for now. */ w->window_end_pos[type] = start_pos; @@ -5635,7 +5641,7 @@ if (need_modeline) { /* We know that this is the right thing to use because we put it - there when we first started working in this function. */ + there when we first started working in this function. */ generate_modeline (w, Dynarr_atp (dla, 0), type); } @@ -5729,7 +5735,7 @@ if (redisplay_move_cursor (w, pointm, WINDOW_TTY_P (w))) { /* Always regenerate the modeline in case it is - displaying the current line or column. */ + displaying the current line or column. */ regenerate_modeline (w); success = 1; } @@ -5814,8 +5820,8 @@ old_end = ddl->end_charpos + ddl->offset; /* If this is the first line being updated and it used - propagation data, fail. Otherwise we'll be okay because - we'll have the necessary propagation data. */ + propagation data, fail. Otherwise we'll be okay because + we'll have the necessary propagation data. */ if (line == first_line && ddl->used_prop_data) return 0; @@ -5824,9 +5830,9 @@ ddl->offset = 0; /* #### If there is propagated stuff the fail. We could - probably actually deal with this if the line had propagated - information when originally created by a full - regeneration. */ + probably actually deal with this if the line had propagated + information when originally created by a full + regeneration. */ if (prop) { Dynarr_free (prop); @@ -5834,7 +5840,7 @@ } /* If any line position parameters have changed or a - cursor has disappeared or disappeared, fail. */ + cursor has disappeared or disappeared, fail. */ db = get_display_block_from_line (ddl, TEXT); if (cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent @@ -5858,7 +5864,7 @@ last_line = line; /* If the extent changes end on the line we just updated then - we're done. Otherwise go on to the next line. */ + we're done. Otherwise go on to the next line. */ if (end_unchanged <= ddl->end_charpos) break; else @@ -5975,7 +5981,7 @@ ddl->offset = 0; /* If there is propagated stuff then it is pretty much a - guarantee that more than just the one line is affected. */ + guarantee that more than just the one line is affected. */ if (prop) { Dynarr_free (prop); @@ -5987,7 +5993,7 @@ return 0; /* If any line position parameters have changed or a - cursor has disappeared or disappeared, fail. */ + cursor has disappeared or disappeared, fail. */ if (cdl->ypos != ddl->ypos || cdl->ascent != ddl->ascent || cdl->descent != ddl->descent @@ -5999,7 +6005,7 @@ } /* If the changed area also ends on this line, then we may be in - business. Update everything and return success. */ + business. Update everything and return success. */ if (end_unchanged >= ddl->charpos && end_unchanged <= ddl->end_charpos) { w->last_modified[DESIRED_DISP] = make_int (BUF_MODIFF (b)); @@ -6019,13 +6025,13 @@ regenerate_modeline (w); /* #### For now we just flush the cache until this has been - tested. After that is done, this should correct the - cache directly. */ + tested. After that is done, this should correct the + cache directly. */ Dynarr_reset (w->line_start_cache); /* Adjust the extent changed boundaries to remove any - overlap with the buffer changes since we've just - successfully updated that area. */ + overlap with the buffer changes since we've just + successfully updated that area. */ if (extent_beg_unchanged != -1 && extent_beg_unchanged >= beg_unchanged && extent_beg_unchanged < end_unchanged) @@ -6040,9 +6046,9 @@ extent_beg_unchanged = extent_end_unchanged = -1; /* This could lead to odd results if it fails, but since the - buffer changes update succeeded this probably will to. - We already know that the extent changes start at or after - the line because we checked before entering the loop. */ + buffer changes update succeeded this probably will to. + We already know that the extent changes start at or after + the line because we checked before entering the loop. */ if (extent_beg_unchanged != -1 && extent_end_unchanged != -1 && ((extent_beg_unchanged < ddl->charpos) @@ -6253,8 +6259,8 @@ if (echo_active) { old_pointm = selected_globally - ? BUF_PT (b) - : marker_position (w->pointm[CURRENT_DISP]); + ? BUF_PT (b) + : marker_position (w->pointm[CURRENT_DISP]); pointm = 1; } else @@ -6343,7 +6349,7 @@ the_buffer); /* #### BUFU amounts of overkill just to get the cursor - location marked properly. FIX ME FIX ME FIX ME */ + location marked properly. FIX ME FIX ME FIX ME */ regenerate_window (w, startp, pointm, DESIRED_DISP); } @@ -6356,7 +6362,7 @@ && XINT (w->last_facechange[CURRENT_DISP]) >= BUF_FACECHANGE (b) && pointm >= startp /* This check is to make sure we restore the minibuffer after a - temporary change to the echo area. */ + temporary change to the echo area. */ && !(MINI_WINDOW_P (w) && f->buffers_changed) && !f->frame_changed && !truncation_changed @@ -6388,8 +6394,8 @@ else { /* If the new point is visible in the redisplay structures, - then let the output update routines handle it, otherwise - do things the hard way. */ + then let the output update routines handle it, otherwise + do things the hard way. */ if (!w->windows_changed && !f->clip_changed && !f->extents_changed @@ -6406,7 +6412,7 @@ if (redisplay_move_cursor (w, pointm, FRAME_TTY_P (f))) { /* Always regenerate in case it is displaying - the current line or column. */ + the current line or column. */ regenerate_modeline (w); skip_output = 1; @@ -6424,7 +6430,7 @@ } /* If we weren't able to take the shortcut method, then use - the brute force method. */ + the brute force method. */ regenerate_window (w, startp, pointm, DESIRED_DISP); if (point_visible (w, pointm, DESIRED_DISP)) @@ -6713,11 +6719,11 @@ it was typical to call it at the end of a critical section (which occurs once per frame); but what then happens if multiple frames have frame changes held up? - + This means we are O(N^2) over frames. I seriously doubt it matters. --ben */ Lisp_Object frmcons, devcons, concons; - + FRAME_LOOP_NO_BREAK (frmcons, devcons, concons) { struct frame *f = XFRAME (XCAR (frmcons)); @@ -7031,11 +7037,11 @@ } /* If the frame redisplay did not get preempted, then this flag - should have gotten set to 0. It might be possible for that - not to happen if a size change event were to occur at an odd - time. To make sure we don't miss anything we simply don't - reset the top level flags until the condition ends up being - in the right state. */ + should have gotten set to 0. It might be possible for that + not to happen if a size change event were to occur at an odd + time. To make sure we don't miss anything we simply don't + reset the top level flags until the condition ends up being + in the right state. */ if (f->size_changed) size_change_failed = 1; } @@ -7163,7 +7169,7 @@ !inhibit_warning_display) { /* If an error occurs during this function, oh well. - If we report another warning, we could get stuck in an + If we report another warning, we could get stuck in an infinite loop reporting warnings. */ call0_trapping_problems (0, Qdisplay_warning_buffer, @@ -7253,9 +7259,9 @@ /* print the current column */ case 'c': { - Charbpos pt = (w == XWINDOW (Fselected_window (Qnil))) - ? BUF_PT (b) - : marker_position (w->pointm[type]); + Charbpos pt = (w == XWINDOW (Fselected_window (Qnil))) + ? BUF_PT (b) + : marker_position (w->pointm[type]); int col = column_at_point (b, pt, 1) + !!column_number_start_at_one; char buf[DECIMAL_PRINT_SIZE (long)]; @@ -7269,14 +7275,14 @@ /* print the file coding system */ case 'C': { - Lisp_Object codesys = b->buffer_file_coding_system; - /* Be very careful here not to get an error. */ + Lisp_Object codesys = b->buffer_file_coding_system; + /* Be very careful here not to get an error. */ if (NILP (codesys) || SYMBOLP (codesys) || CODING_SYSTEMP (codesys)) - { - codesys = find_coding_system_for_text_file (codesys, 0); + { + codesys = find_coding_system_for_text_file (codesys, 0); if (CODING_SYSTEMP (codesys)) - obj = XCODING_SYSTEM_MNEMONIC (codesys); - } + obj = XCODING_SYSTEM_MNEMONIC (codesys); + } } break; @@ -7323,7 +7329,7 @@ break; /* print * or hyphen -- XEmacs change to allow a buffer to be - read-only but still indicate whether it is modified. */ + read-only but still indicate whether it is modified. */ case '+': str = ((BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) ? "*" @@ -7333,7 +7339,7 @@ break; /* #### defined in 19.29 decode_mode_spec, but not in - modeline-format doc string. */ + modeline-format doc string. */ /* This differs from %* in that it ignores read-only-ness. */ case '&': str = ((BUF_MODIFF (b) > BUF_SAVE_MODIFF (b)) @@ -7379,7 +7385,7 @@ else { /* This hard limit is ok since the string it will hold has a - fixed maximum length of 3. But just to be safe... */ + fixed maximum length of 3. But just to be safe... */ char buf[10]; Charcount chars = pos - BUF_BEGV (b); Charcount total = BUF_ZV (b) - BUF_BEGV (b); @@ -7390,7 +7396,7 @@ (chars * 100 + total/2) / total; /* We can't normally display a 3-digit number, so get us a - 2-digit number that is close. */ + 2-digit number that is close. */ if (percent == 100) percent = 99; @@ -7411,8 +7417,8 @@ Charbpos botpos = BUF_Z (b) - w->window_end_pos[type]; /* botpos is only accurate as of the last redisplay, so we can - only treat it as a hint. In particular, after erase-buffer, - botpos may be negative. */ + only treat it as a hint. In particular, after erase-buffer, + botpos may be negative. */ if (botpos < toppos) botpos = toppos; @@ -7426,7 +7432,7 @@ else { /* This hard limit is ok since the string it will hold has a - fixed maximum length of around 6. But just to be safe... */ + fixed maximum length of around 6. But just to be safe... */ char buf[10]; Charcount chars = botpos - BUF_BEGV (b); Charcount total = BUF_ZV (b) - BUF_BEGV (b); @@ -7437,7 +7443,7 @@ (chars * 100 + total/2) / max (total, 1); /* We can't normally display a 3-digit number, so get us a - 2-digit number that is close. */ + 2-digit number that is close. */ if (percent == 100) percent = 99; @@ -7520,7 +7526,7 @@ if (dl->display_blocks) { for (block = 0; block < Dynarr_largest (dl->display_blocks); block++) - { + { struct display_block *db = Dynarr_atp (dl->display_blocks, block); Dynarr_free (db->runes); @@ -7688,16 +7694,16 @@ if (!w->line_cache_validation_override) { /* f->extents_changed used to be in here because extent face and - size changes can cause text shifting. However, the extent - covering the region is constantly having its face set and - priority altered by the mouse code. This means that the line - start cache is constantly being invalidated. This is bad - since the mouse code also triggers heavy usage of the cache. - Since it is an unlikely that f->extents being changed - indicates that the cache really needs to be updated and if it - does redisplay will catch it pretty quickly we no longer - invalidate the cache if it is set. This greatly speeds up - dragging out regions with the mouse. */ + size changes can cause text shifting. However, the extent + covering the region is constantly having its face set and + priority altered by the mouse code. This means that the line + start cache is constantly being invalidated. This is bad + since the mouse code also triggers heavy usage of the cache. + Since it is an unlikely that f->extents being changed + indicates that the cache really needs to be updated and if it + does redisplay will catch it pretty quickly we no longer + invalidate the cache if it is set. This greatly speeds up + dragging out regions with the mouse. */ if (XINT (w->line_cache_last_updated) < BUF_MODIFF (b) || f->faces_changed || f->clip_changed) @@ -7769,8 +7775,8 @@ int win_char_height = window_char_height (w, 1); /* Occasionally we get here with a 0 height - window. find_next_newline_no_quit will abort if we pass it a - count of 0 so handle that case. */ + window. find_next_newline_no_quit will abort if we pass it a + count of 0 so handle that case. */ if (!win_char_height) win_char_height = 1; @@ -7983,7 +7989,7 @@ window_char_height (w, 0)); /* We've already actually processed old_startp, so increment - immediately. */ + immediately. */ start_elt++; /* If this happens we didn't add any extra elements. Bummer. */ @@ -8032,7 +8038,7 @@ static Charbpos start_end_of_last_line (struct window *w, Charbpos startp, int end, - int may_error) + int may_error) { struct buffer *b = XBUFFER (w->buffer); line_start_cache_dynarr *cache = w->line_start_cache; @@ -8168,7 +8174,7 @@ pixheight -= Dynarr_atp (w->line_start_cache, cur_elt)->height; /* Do not take into account the value of vertical_clip here. - That is the responsibility of the calling functions. */ + That is the responsibility of the calling functions. */ if (pixheight < 0) { w->line_cache_validation_override--; @@ -8248,18 +8254,18 @@ else { /* The calculated value of pixpos is correct for the bottom line - or what we want when line is -1. Therefore we subtract one - because we have already handled one line. */ + or what we want when line is -1. Therefore we subtract one + because we have already handled one line. */ int new_line = -line - 1; int cur_elt = point_in_line_start_cache (w, point, new_line); int pixpos = WINDOW_TEXT_BOTTOM (w); Charbpos retval, search_point; /* If scroll_on_clipped_lines is false, the last "visible" line of - the window covers the pixel at WINDOW_TEXT_BOTTOM (w) - 1. - If s_o_c_l is true, then we don't want to count a clipped - line, so back up from the bottom by the height of the line - containing point. */ + the window covers the pixel at WINDOW_TEXT_BOTTOM (w) - 1. + If s_o_c_l is true, then we don't want to count a clipped + line, so back up from the bottom by the height of the line + containing point. */ if (scroll_on_clipped_lines) pixpos -= Dynarr_atp (w->line_start_cache, cur_elt)->height; else @@ -8376,15 +8382,15 @@ Dynarr_atp (internal_cache, Dynarr_length (internal_cache) - 1)->end; /* We aren't allowed to generate additional information to fill in - gaps, so if the DESIRED structs don't overlap the cache, reset the - cache. */ + gaps, so if the DESIRED structs don't overlap the cache, reset the + cache. */ if (Dynarr_length (cache)) { if (end < low_bound || start > high_bound) Dynarr_reset (cache); /* #### What should really happen if what we are doing is - extending a line (the last line)? */ + extending a line (the last line)? */ if (Dynarr_length (cache) == 1 && Dynarr_length (internal_cache) == 1) Dynarr_reset (cache); @@ -8399,7 +8405,7 @@ } /* An extra check just in case the calling function didn't pass in - the bounds of the DESIRED structs in the first place. */ + the bounds of the DESIRED structs in the first place. */ if (start >= low_bound && end <= high_bound) { w->line_cache_validation_override--; @@ -8407,7 +8413,7 @@ } /* At this point we know that the internal cache partially overlaps - the main cache. */ + the main cache. */ if (start < low_bound) { int ic_elt = Dynarr_length (internal_cache) - 1; @@ -8470,13 +8476,13 @@ while (startp < old_lb || low_bound == -1) { int ic_elt; - Charbpos new_startp; + Charbpos new_startp; regenerate_window (w, startp, point, CMOTION_DISP); update_internal_cache_list (w, CMOTION_DISP); /* If this assert is triggered then regenerate_window failed - to layout a single line. This is not possible since we + to layout a single line. This is not possible since we force at least a single line to be layout for CMOTION_DISP */ assert (Dynarr_length (internal_cache)); assert (startp == Dynarr_atp (internal_cache, 0)->start); @@ -8496,28 +8502,28 @@ new_startp = Dynarr_atp (internal_cache, ic_elt)->end + 1; - /* - * Handle invisible text properly: - * If the last line we're inserting has the same end as the - * line before which it will be added, merge the two lines. - */ - if (Dynarr_length (cache) && - Dynarr_atp (internal_cache, ic_elt)->end == - Dynarr_atp (cache, marker)->end) - { - Dynarr_atp (cache, marker)->start - = Dynarr_atp (internal_cache, ic_elt)->start; - Dynarr_atp (cache, marker)->height - = Dynarr_atp (internal_cache, ic_elt)->height; - ic_elt--; - } - - if (ic_elt >= 0) /* we still have lines to add.. */ - { - Dynarr_insert_many (cache, Dynarr_atp (internal_cache, 0), - ic_elt + 1, marker); - marker += (ic_elt + 1); - } + /* + * Handle invisible text properly: + * If the last line we're inserting has the same end as the + * line before which it will be added, merge the two lines. + */ + if (Dynarr_length (cache) && + Dynarr_atp (internal_cache, ic_elt)->end == + Dynarr_atp (cache, marker)->end) + { + Dynarr_atp (cache, marker)->start + = Dynarr_atp (internal_cache, ic_elt)->start; + Dynarr_atp (cache, marker)->height + = Dynarr_atp (internal_cache, ic_elt)->height; + ic_elt--; + } + + if (ic_elt >= 0) /* we still have lines to add.. */ + { + Dynarr_insert_many (cache, Dynarr_atp (internal_cache, 0), + ic_elt + 1, marker); + marker += (ic_elt + 1); + } if (startp < low_bound || low_bound == -1) low_bound = startp; @@ -8983,7 +8989,7 @@ if (MINI_WINDOW_P (*w) && !minibuf_level) { /* Must reset the window value since some callers will ignore - the return value if it is set. */ + the return value if it is set. */ *w = 0; UPDATE_CACHE_RETURN; } @@ -9087,10 +9093,10 @@ || x_coord >= dl->bounds.right_in) { /* If we are over the outside margins then we - know the loop over the text block isn't going - to accomplish anything. So we go ahead and - set what information we can right here and - return. */ + know the loop over the text block isn't going + to accomplish anything. So we go ahead and + set what information we can right here and + return. */ (*row)--; *obj_y = y_coord - (dl->ypos - dl->ascent); get_position_object (dl, obj1, obj2, x_coord, @@ -9147,8 +9153,8 @@ } /* In this case we failed to find a non-glyph - character so we return the last position - displayed on the line. */ + character so we return the last position + displayed on the line. */ if (elt == Dynarr_length (db->runes)) { if (dl->modeline) @@ -9197,7 +9203,7 @@ { (*row)--; /* At this point we may have glyphs in the right - inside margin. */ + inside margin. */ if (check_margin_glyphs) get_position_object (dl, obj1, obj2, x_coord, &low_x_coord, &high_x_coord); @@ -9226,7 +9232,7 @@ *obj_y = y_coord - (dl->ypos - dl->ascent); /* At this point we may have glyphs in the left - inside margin. */ + inside margin. */ if (check_margin_glyphs) get_position_object (dl, obj1, obj2, x_coord, 0, 0); @@ -9687,7 +9693,7 @@ display_line_dynarr *dl; dl = window_display_lines (w, CURRENT_DISP); - + for (i = 0; i < Dynarr_largest (dl); i++) for (j = i + 1; j < Dynarr_largest (dl); j++) assert (Dynarr_atp (dl, i)->display_blocks != @@ -9742,10 +9748,15 @@ internal_cache = Dynarr_new (line_start_cache); } - /* window system is nil when in -batch mode */ - if (!initialized || noninteractive) + if (!initialized) return; + if (noninteractive) + { + Vinitial_device_type = Qstream; + return; + } + /* If the user wants to use a window system, we shouldn't bother initializing the terminal. This is especially important when the terminal is so dumb that emacs gives up before and doesn't bother @@ -9759,7 +9770,7 @@ { /* Some stuff checks this way early. */ Vwindow_system = Qx; - Vinitial_window_system = Qx; + Vinitial_device_type = Qx; return; } #endif /* HAVE_X_WINDOWS */ @@ -9768,7 +9779,7 @@ if (!strcmp (display_use, "gtk")) { Vwindow_system = Qgtk; - Vinitial_window_system = Qgtk; + Vinitial_device_type = Qgtk; return; } #endif @@ -9778,7 +9789,7 @@ { /* Some stuff checks this way early. */ Vwindow_system = Qmswindows; - Vinitial_window_system = Qmswindows; + Vinitial_device_type = Qmswindows; return; } #endif /* HAVE_MS_WINDOWS */ @@ -9798,7 +9809,7 @@ exit (1); } - Vinitial_window_system = Qtty; + Vinitial_device_type = Qtty; return; #else /* not HAVE_TTY */ /* No DISPLAY specified, and no TTY support. */ @@ -9942,11 +9953,13 @@ */ ); Vwindow_system = Qnil; - /* #### Temporary shit until window-system is eliminated. */ - DEFVAR_CONST_LISP ("initial-window-system", &Vinitial_window_system /* -DON'T TOUCH + DEFVAR_CONST_LISP ("initial-device-type", &Vinitial_device_type /* +The type of the first XEmacs device to be created. + +This is constant; it's used by the command line handling code to communicate +to Lisp what type the initial device to be created should be. */ ); - Vinitial_window_system = Qnil; + Vinitial_device_type = Qnil; DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area /* Non-nil means put cursor in minibuffer, at end of any message there. diff -r 71bf2c5667ba -r 66411359ce4e src/redisplay.h --- a/src/redisplay.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/redisplay.h Sat Oct 25 21:40:46 2008 +0900 @@ -81,6 +81,8 @@ #define NEXT_CURSOR 3 #define IGNORE_CURSOR 4 +/* #### NOTE: these indexes depend on the order in which the faces are added + to the cache in the function reset_face_cachels. */ #define DEFAULT_INDEX (face_index) 0 #define MODELINE_INDEX (face_index) 1 @@ -134,7 +136,7 @@ Charcount, but who's looking? */ Charxpos endpos; /* if set this rune covers a range of pos; used in redisplay_move_cursor(). */ - /* #### Chuck, what does it mean for a rune + /* #### Chuck, what does it mean for a rune to cover a range of pos? I don't get this. */ @@ -145,11 +147,11 @@ unsigned char cursor_type; /* is this rune covered by the cursor? */ unsigned int type; /* type of rune object */ - /* We used to do bitfields here, but if I - (JV) count correctly that doesn't matter - for the size of the structure. All the bit - fiddling _does_ slow down redisplay by - about 10%. So don't do that */ + /* We used to do bitfields here, but if I + (JV) count correctly that doesn't matter + for the size of the structure. All the bit + fiddling _does_ slow down redisplay by + about 10%. So don't do that */ union /* Information specific to the type of rune */ { @@ -313,7 +315,7 @@ char modeline; /* t if this line is a modeline */ char line_continuation; /* t if this line continues to - next display line. */ + next display line. */ /* Dynamic array of display blocks */ display_block_dynarr *display_blocks; @@ -327,6 +329,14 @@ face_index default_findex; }; +#define DISPLAY_LINE_INIT(dl) \ + do \ + { \ + xzero (dl); \ + dl.default_findex = DEFAULT_INDEX; \ + } \ + while (0) + #define DISPLAY_LINE_HEIGHT(dl) \ (dl->ascent + dl->descent - (dl->clip + dl->top_clip)) #define DISPLAY_LINE_YPOS(dl) \ @@ -510,15 +520,15 @@ Lisp_Object MTC_devcons, MTC_concons; \ DEVICE_LOOP_NO_BREAK (MTC_devcons, MTC_concons) \ { \ - Lisp_Object MTC_frmcons; \ - struct device *MTC_d = XDEVICE (XCAR (MTC_devcons)); \ - DEVICE_FRAME_LOOP (MTC_frmcons, MTC_d) \ + Lisp_Object MTC_frmcons; \ + struct device *MTC_d = XDEVICE (XCAR (MTC_devcons)); \ + DEVICE_FRAME_LOOP (MTC_frmcons, MTC_d) \ { \ struct frame *MTC_f = XFRAME (XCAR (MTC_frmcons)); \ - MTC_f->object##_changed = 1; \ + MTC_f->object##_changed = 1; \ MTC_f->modiff++; \ } \ - MTC_d->object##_changed = 1; \ + MTC_d->object##_changed = 1; \ } \ object##_changed = 1; \ object##_changed_set = 1; } \ @@ -807,7 +817,7 @@ int cursor_height, int offset_bitmap); int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, int xoffset, int yoffset, int start_pixpos, - int width, struct display_box* dest, + int width, struct display_box* dest, struct display_glyph_area* src); int redisplay_normalize_glyph_area (struct display_box* dest, struct display_glyph_area* glyphsrc); diff -r 71bf2c5667ba -r 66411359ce4e src/s/sol2.h --- a/src/s/sol2.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/s/sol2.h Sat Oct 25 21:40:46 2008 +0900 @@ -11,7 +11,7 @@ #endif /* Fix understandable GCC lossage on Solaris 2.6 */ -#if defined(__GNUC__) && OS_RELEASE >= 506 && !defined(NOT_C_CODE) +#if defined(__GNUC__) && OS_RELEASE >= 506 && OS_RELEASE < 510 && !defined(NOT_C_CODE) /* GCC va_list munging is a little messed up */ #define __GNUC_VA_LIST diff -r 71bf2c5667ba -r 66411359ce4e src/search.c --- a/src/search.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/search.c Sat Oct 25 21:40:46 2008 +0900 @@ -47,6 +47,15 @@ #define REGEXP_CACHE_SIZE 20 +#ifdef DEBUG_XEMACS + +/* Used in tests/automated/case-tests.el if available. */ +Fixnum debug_xemacs_searches; + +Lisp_Object Qsearch_algorithm_used, Qboyer_moore, Qsimple_search; + +#endif + /* If the regexp is non-nil, then the buffer contains the compiled form of that regexp, suitable for searching. */ struct regexp_cache @@ -1340,11 +1349,14 @@ { int charset_base = -1; int boyer_moore_ok = 1; - Ibyte *pat = 0; Ibyte *patbuf = alloca_ibytes (len * MAX_ICHAR_LEN); - pat = patbuf; + Ibyte *pat = patbuf; + #ifdef MULE - /* &&#### needs some 8-bit work here */ + int entirely_one_byte_p = buf->text->entirely_one_byte_p; + int nothing_greater_than_0xff = + buf->text->num_8_bit_fixed_chars == BUF_Z(buf) - BUF_BEG (buf); + while (len > 0) { Ibyte tmp_str[MAX_ICHAR_LEN]; @@ -1367,25 +1379,105 @@ inv_bytelen = set_itext_ichar (tmp_str, inverse); new_bytelen = set_itext_ichar (tmp_str, translated); - if (new_bytelen != orig_bytelen || inv_bytelen != orig_bytelen) - boyer_moore_ok = 0; - if (translated != c || inverse != c) - { - /* Keep track of which character set row - contains the characters that need translation. */ - int charset_base_code = c & ~ICHAR_FIELD3_MASK; - if (charset_base == -1) - charset_base = charset_base_code; - else if (charset_base != charset_base_code) - /* If two different rows appear, needing translation, - then we cannot use boyer_moore search. */ - boyer_moore_ok = 0; - } + if (boyer_moore_ok + /* Only do the Boyer-Moore check for characters needing + translation. */ + && (translated != c || inverse != c)) + { + Ichar starting_c = c; + int charset_base_code, checked = 0; + + do + { + c = TRANSLATE (inverse_trt, c); + + /* If a character cannot occur in the buffer, ignore + it. */ + if (c > 0x7F && entirely_one_byte_p) + continue; + + if (c > 0xFF && nothing_greater_than_0xff) + continue; + + checked = 1; + + if (-1 == charset_base) /* No charset yet specified. */ + { + /* Keep track of which charset and character set row + contains the characters that need translation. + + Zero out the bits corresponding to the last + byte. */ + charset_base = c & ~ICHAR_FIELD3_MASK; + } + else + { + charset_base_code = c & ~ICHAR_FIELD3_MASK; + + if (charset_base_code != charset_base) + { + /* If two different rows, or two different + charsets, appear, needing non-ASCII + translation, then we cannot use boyer_moore + search. See the comment at the head of + boyer_moore(). */ + boyer_moore_ok = 0; + break; + } + } + } while (c != starting_c); + + if (!checked) + { +#ifdef DEBUG_XEMACS + if (debug_xemacs_searches) + { + Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used); + sym->value = Qnil; + } +#endif + /* The "continue" clauses were used above, for every + translation of the character. As such, this character + is not to be found in the buffer and neither is the + string as a whole. Return immediately; also avoid + triggering the assertion a few lines down. */ + return n > 0 ? -n : n; + } + + if (boyer_moore_ok && charset_base != -1 && + charset_base != (translated & ~ICHAR_FIELD3_MASK)) + { + /* In the rare event that the CANON entry for this + character is not in the desired set, choose one + that is, from the equivalence set. It doesn't much + matter which. */ + Ichar starting_ch = translated; + do + { + translated = TRANSLATE (inverse_trt, translated); + + if (charset_base == (translated & ~ICHAR_FIELD3_MASK)) + break; + + } while (starting_ch != translated); + + assert (starting_ch != translated); + + new_bytelen = set_itext_ichar (tmp_str, translated); + } + } + memcpy (pat, tmp_str, new_bytelen); pat += new_bytelen; base_pat += orig_bytelen; len -= orig_bytelen; } + + if (-1 == charset_base) + { + charset_base = 'a' & ~ICHAR_FIELD3_MASK; /* Default to ASCII. */ + } + #else /* not MULE */ while (--len >= 0) { @@ -1402,6 +1494,15 @@ #endif /* MULE */ len = pat - patbuf; pat = base_pat = patbuf; + +#ifdef DEBUG_XEMACS + if (debug_xemacs_searches) + { + Lisp_Symbol *sym = XSYMBOL (Qsearch_algorithm_used); + sym->value = boyer_moore_ok ? Qboyer_moore : Qsimple_search; + } +#endif + if (boyer_moore_ok) return boyer_moore (buf, base_pat, len, pos, lim, n, trt, inverse_trt, charset_base); @@ -1468,43 +1569,51 @@ n--; } else - while (n < 0) - { - while (1) - { - Bytecount this_len = len; - Bytebpos this_pos = pos; - Ibyte *p; - if (pos <= lim) - goto stop; - p = base_pat + len; - - while (this_len > 0) - { - Ichar pat_ch, buf_ch; - - DEC_IBYTEPTR (p); - DEC_BYTEBPOS (buf, this_pos); - pat_ch = itext_ichar (p); - buf_ch = BYTE_BUF_FETCH_CHAR (buf, this_pos); - - buf_ch = TRANSLATE (trt, buf_ch); - - if (buf_ch != pat_ch) + { + /* If lim < len, then there are too few buffer positions to hold the + pattern between the beginning of the buffer and lim. Adjust to + ensure pattern fits. If we don't do this, we can assert in the + DEC_BYTEBPOS below. */ + if (lim < len) + lim = len; + while (n < 0) + { + while (1) + { + Bytecount this_len = len; + Bytebpos this_pos = pos; + Ibyte *p; + if (pos <= lim) + goto stop; + p = base_pat + len; + + while (this_len > 0) + { + Ichar pat_ch, buf_ch; + + DEC_IBYTEPTR (p); + DEC_BYTEBPOS (buf, this_pos); + pat_ch = itext_ichar (p); + buf_ch = BYTE_BUF_FETCH_CHAR (buf, this_pos); + + buf_ch = TRANSLATE (trt, buf_ch); + + if (buf_ch != pat_ch) + break; + + this_len -= itext_ichar_len (p); + } + if (this_len == 0) + { + buf_len = pos - this_pos; + pos = this_pos; break; - - this_len -= itext_ichar_len (p); - } - if (this_len == 0) - { - buf_len = pos - this_pos; - pos = this_pos; - break; - } - DEC_BYTEBPOS (buf, pos); - } - n++; - } + } + DEC_BYTEBPOS (buf, pos); + } + n++; + } + } stop: if (n == 0) { @@ -1536,18 +1645,18 @@ TRT and INVERSE_TRT are translation tables. This kind of search works if all the characters in PAT that have - nontrivial translation are the same aside from the last byte. This - makes it possible to translate just the last byte of a character, - and do so after just a simple test of the context. - - If that criterion is not satisfied, do not call this function. */ + (non-ASCII) translation are the same aside from the last byte. This + makes it possible to translate just the last byte of a character, and do + so after just a simple test of the context. + + If that criterion is not satisfied, do not call this function. You will + get an assertion failure. */ static Charbpos boyer_moore (struct buffer *buf, Ibyte *base_pat, Bytecount len, Bytebpos pos, Bytebpos lim, EMACS_INT n, Lisp_Object trt, Lisp_Object inverse_trt, int USED_IF_MULE (charset_base)) { - /* &&#### needs some 8-bit work here */ /* #### Someone really really really needs to comment the workings of this junk somewhat better. @@ -1591,6 +1700,13 @@ #ifdef MULE Ibyte translate_prev_byte = 0; Ibyte translate_anteprev_byte = 0; + /* These need to be rethought in the event that the internal format + changes, or in the event that num_8_bit_fixed_chars disappears + (entirely_one_byte_p can be trivially worked out by checking is the + byte count equal to the char count.) */ + int buffer_entirely_one_byte_p = buf->text->entirely_one_byte_p; + int buffer_nothing_greater_than_0xff = + buf->text->num_8_bit_fixed_chars == BUF_Z(buf) - BUF_BEG (buf); #endif #ifdef C_ALLOCA EMACS_INT BM_tab_space[0400]; @@ -1673,20 +1789,45 @@ while (!ibyte_first_byte_p (*charstart)) charstart--; untranslated = itext_ichar (charstart); - if (charset_base == (untranslated & ~ICHAR_FIELD3_MASK)) - { - ch = TRANSLATE (trt, untranslated); - if (!ibyte_first_byte_p (*ptr)) - { - translate_prev_byte = ptr[-1]; - if (!ibyte_first_byte_p (translate_prev_byte)) - translate_anteprev_byte = ptr[-2]; - } - } - else - { - this_translated = 0; - ch = *ptr; + + ch = TRANSLATE (trt, untranslated); + if (!ibyte_first_byte_p (*ptr)) + { + translate_prev_byte = ptr[-1]; + if (!ibyte_first_byte_p (translate_prev_byte)) + translate_anteprev_byte = ptr[-2]; + } + + if (ch != untranslated && /* Was translation done? */ + charset_base != (ch & ~ICHAR_FIELD3_MASK)) + { + /* In the very rare event that the CANON entry for this + character is not in the desired set, choose one that + is, from the equivalence set. It doesn't much matter + which, since we're building our own cheesy equivalence + table instead of using that belonging to the case + table directly. + + We can get here if search_buffer has worked out that + the buffer is entirely single width. */ + Ichar starting_ch = ch; + int count = 0; + do + { + ch = TRANSLATE (inverse_trt, ch); + if (charset_base == (ch & ~ICHAR_FIELD3_MASK)) + break; + ++count; + } while (starting_ch != ch); + + /* If starting_ch is equal to ch (and count is not one, + which means no translation is necessary), the case + table is corrupt. (Any mapping in the canon table + should be reflected in the equivalence table, and we + know from the canon table that untranslated maps to + starting_ch and that untranslated has the correct value + for charset_base.) */ + assert (1 == count || starting_ch != ch); } } else @@ -1702,28 +1843,34 @@ if (i == infinity) stride_for_teases = BM_tab[j]; BM_tab[j] = dirlen - i; - /* A translation table is accompanied by its inverse -- - see comment in casetab.c. */ + /* A translation table is accompanied by its inverse -- see + comment in casetab.c. */ if (this_translated) { Ichar starting_ch = ch; EMACS_INT starting_j = j; - while (1) + do { ch = TRANSLATE (inverse_trt, ch); - if (ch > 0400) - j = ((unsigned char) ch | 0200); - else - j = (unsigned char) ch; - - /* For all the characters that map into CH, - set up simple_translate to map the last byte - into STARTING_J. */ - simple_translate[j] = (Ibyte) starting_j; - if (ch == starting_ch) - break; - BM_tab[j] = dirlen - i; - } + + if (ch > 0x7F && buffer_entirely_one_byte_p) + continue; + + if (ch > 0xFF && buffer_nothing_greater_than_0xff) + continue; + + if (ch > 0400) + j = ((unsigned char) ch | 0200); + else + j = (unsigned char) ch; + + /* For all the characters that map into CH, set up + simple_translate to map the last byte into + STARTING_J. */ + simple_translate[j] = (Ibyte) starting_j; + BM_tab[j] = dirlen - i; + + } while (ch != starting_ch); } #else EMACS_INT k; @@ -2364,15 +2511,22 @@ DEFUN ("replace-match", Freplace_match, 1, 5, 0, /* Replace text matched by last search with REPLACEMENT. -If second arg FIXEDCASE is non-nil, do not alter case of replacement text. +Leaves point at end of replacement text. +Optional boolean FIXEDCASE inhibits matching case of REPLACEMENT to source. +Optional boolean LITERAL inhibits interpretation of escape sequences. +Optional STRING provides the source text to replace. +Optional STRBUFFER may be a buffer, providing match context, or an integer + specifying the subexpression to replace. + +If FIXEDCASE is non-nil, do not alter case of replacement text. Otherwise maybe capitalize the whole text, or maybe just word initials, based on the replaced text. -If the replaced text has only capital letters -and has at least one multiletter word, convert REPLACEMENT to all caps. +If the replaced text has only capital letters and has at least one +multiletter word, convert REPLACEMENT to all caps. If the replaced text has at least one word starting with a capital letter, then capitalize each word in REPLACEMENT. -If third arg LITERAL is non-nil, insert REPLACEMENT literally. +If LITERAL is non-nil, insert REPLACEMENT literally. Otherwise treat `\\' as special: `\\&' in REPLACEMENT means substitute original matched text. `\\N' means substitute what matched the Nth `\\(...\\)'. @@ -2385,24 +2539,31 @@ `\\E' means terminate the effect of any `\\U' or `\\L'. Case changes made with `\\u', `\\l', `\\U', and `\\L' override all other case changes that may be made in the replaced text. -FIXEDCASE and LITERAL are optional arguments. -Leaves point at end of replacement text. - -The optional fourth argument STRING can be a string to modify. -In that case, this function creates and returns a new string -which is made by replacing the part of STRING that was matched. -When fourth argument is a string, fifth argument STRBUFFER specifies -the buffer to be used for syntax-table and case-table lookup and -defaults to the current buffer. When fourth argument is not a string, -the buffer that the match occurred in has automatically been remembered -and you do not need to specify it. - -When fourth argument is nil, STRBUFFER specifies a subexpression of -the match. It says to replace just that subexpression instead of the -whole match. This is useful only after a regular expression search or -match since only regular expressions have distinguished subexpressions. - -If no match (including searches) has been conducted or the requested + +If non-nil, STRING is the source string, and a new string with the specified +replacements is created and returned. Otherwise the current buffer is the +source text. + +If non-nil, STRBUFFER may be an integer, interpreted as the index of the +subexpression to replace in the source text, or a buffer to provide the +syntax table and case table. If nil, then the \"subexpression\" is 0, i.e., +the whole match, and the current buffer provides the syntax and case tables. +If STRING is nil, STRBUFFER must be nil or an integer. + +Specifying a subexpression is only useful after a regular expression match, +since a fixed string search has no non-trivial subexpressions. + +It is not possible to specify both a buffer and a subexpression. If that is +desired, the idiom `(with-current-buffer BUFFER (replace-match ... INTEGER))' +may be appropriate. + +If STRING is nil but the last thing matched (or searched) was a string, or +STRING is a string but the last thing matched was a buffer, an +`invalid-argument' error will be signaled. (XEmacs does not check that the +last thing searched is the source string, but it is not useful to use a +different string as source.) + +If no match (including searches) has been successful or the requested subexpression was not matched, an `args-out-of-range' error will be signaled. (If no match has ever been conducted in this instance of XEmacs, an `invalid-operation' error will be signaled. This is very @@ -2430,31 +2591,59 @@ CHECK_STRING (replacement); + /* Because GNU decided to be incompatible here, we support the following + baroque and bogus API for the STRING and STRBUFFER arguments: + types interpretations + STRING STRBUFFER STRING STRBUFFER + nil nil none 0 = index of subexpression to replace + nil integer none index of subexpression to replace + nil other ***** error ***** + string nil source current buffer provides syntax table + subexpression = 0 (whole match) + string buffer source buffer providing syntax table + subexpression = 0 (whole match) + string integer source current buffer provides syntax table + subexpression = STRBUFFER + string other ***** error ***** + */ + + /* Do STRBUFFER first; if STRING is nil, we'll overwrite BUF and BUFFER. */ + + /* If the match data were abstracted into a special "match data" type + instead of the typical half-assed "let the implementation be visible" + form it's in, we could extend it to include the last string matched + and the buffer used for that matching. But of course we can't change + it as it is. + */ + if (NILP (strbuffer) || BUFFERP (strbuffer)) + { + buf = decode_buffer (strbuffer, 0); + } + else if (!NILP (strbuffer)) + { + CHECK_INT (strbuffer); + sub = XINT (strbuffer); + if (sub < 0 || sub >= (int) search_regs.num_regs) + invalid_argument ("match data register invalid", strbuffer); + if (search_regs.start[sub] < 0) + invalid_argument ("match data register not set", strbuffer); + buf = current_buffer; + } + else + invalid_argument ("STRBUFFER must be nil, a buffer, or an integer", + strbuffer); + buffer = wrap_buffer (buf); + if (! NILP (string)) { CHECK_STRING (string); if (!EQ (last_thing_searched, Qt)) - invalid_argument ("last thing matched was not a string", Qunbound); - /* If the match data - were abstracted into a special "match data" type instead - of the typical half-assed "let the implementation be - visible" form it's in, we could extend it to include - the last string matched and the buffer used for that - matching. But of course we can't change it as it is. */ - buf = decode_buffer (strbuffer, 0); - buffer = wrap_buffer (buf); + invalid_argument ("last thing matched was not a string", Qunbound); } else { - if (!NILP (strbuffer)) - { - CHECK_INT (strbuffer); - sub = XINT (strbuffer); - if (sub < 0 || sub >= (int) search_regs.num_regs) - args_out_of_range (strbuffer, make_int (search_regs.num_regs)); - } if (!BUFFERP (last_thing_searched)) - invalid_argument ("last thing matched was not a buffer", Qunbound); + invalid_argument ("last thing matched was not a buffer", Qunbound); buffer = last_thing_searched; buf = XBUFFER (buffer); } @@ -2557,8 +2746,8 @@ Lisp_Object before, after; speccount = specpdl_depth (); - before = Fsubstring (string, Qzero, make_int (search_regs.start[0])); - after = Fsubstring (string, make_int (search_regs.end[0]), Qnil); + before = Fsubstring (string, Qzero, make_int (search_regs.start[sub])); + after = Fsubstring (string, make_int (search_regs.end[sub]), Qnil); /* Do case substitution into REPLACEMENT if desired. */ if (NILP (literal)) @@ -2600,6 +2789,8 @@ substart = search_regs.start[0]; subend = search_regs.end[0]; } + /* #### This logic is totally broken, + since we can have backrefs like "\99", right? */ else if (c >= '1' && c <= '9' && c <= search_regs.num_regs + '0') { @@ -2759,6 +2950,8 @@ (buffer, make_int (search_regs.start[0] + offset), make_int (search_regs.end[0] + offset)); + /* #### This logic is totally broken, + since we can have backrefs like "\99", right? */ else if (c >= '1' && c <= '9' && c <= search_regs.num_regs + '0') { @@ -3175,4 +3368,15 @@ Vskip_chars_range_table = Fmake_range_table (Qstart_closed_end_closed); staticpro (&Vskip_chars_range_table); +#ifdef DEBUG_XEMACS + DEFSYMBOL (Qsearch_algorithm_used); + DEFSYMBOL (Qboyer_moore); + DEFSYMBOL (Qsimple_search); + + DEFVAR_INT ("debug-xemacs-searches", &debug_xemacs_searches /* +If non-zero, bind `search-algorithm-used' to `boyer-moore' or `simple-search', +depending on the algorithm used for each search. Used for testing. +*/ ); + debug_xemacs_searches = 0; +#endif } diff -r 71bf2c5667ba -r 66411359ce4e src/sound.c --- a/src/sound.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/sound.c Sat Oct 25 21:40:46 2008 +0900 @@ -64,7 +64,7 @@ #endif #if defined(HAVE_NATIVE_SOUND) || defined(HAVE_NAS_SOUND) \ - || defined(HAVE_ESD_SOUND) + || defined(HAVE_ALSA_SOUND) || defined(HAVE_ESD_SOUND) #define USED_IF_HAVE_ANY(decl) decl #else #define USED_IF_HAVE_ANY(decl) UNUSED (decl) diff -r 71bf2c5667ba -r 66411359ce4e src/specifier.c --- a/src/specifier.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/specifier.c Sat Oct 25 21:40:46 2008 +0900 @@ -247,7 +247,7 @@ { Lisp_Specifier* sp = XSPECIFIER (rest); /* A bit of assertion that we're removing both parts of the - magic one altogether */ + magic one altogether */ assert (!MAGIC_SPECIFIER_P(sp) || (BODILY_SPECIFIER_P(sp) && marked_p (sp->fallback)) || (GHOST_SPECIFIER_P(sp) && marked_p (sp->magic_parent))); @@ -386,10 +386,10 @@ }; #ifdef NEW_GC -DEFINE_LRECORD_IMPLEMENTATION ("specifier-caching", +DEFINE_LRECORD_IMPLEMENTATION ("specifier-caching", specifier_caching, 1, /*dumpable-flag*/ - 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, specifier_caching_description_1, struct specifier_caching); #else /* not NEW_GC */ @@ -695,7 +695,7 @@ ? Qt : Qnil; } -DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1, +DEFUN ("valid-specifier-locale-type-p", Fvalid_specifier_locale_type_p, 1, 1, 0, /* Given a specifier LOCALE-TYPE, return non-nil if it is valid. Valid locale types are `global', `device', `frame', `window', and `buffer'. @@ -983,8 +983,8 @@ static int charset_matches_specifier_tag_set_p (Lisp_Object charset, - Lisp_Object tag_set, - enum font_specifier_matchspec_stages + Lisp_Object tag_set, + enum font_specifier_matchspec_stages stage) { Lisp_Object rest; @@ -998,20 +998,20 @@ Lisp_Object assoc; /* In the event that, during the creation of a charset, no specifier - tags exist for which CHARSET-PREDICATE has been specified, then - that charset's entry in Vcharset_tag_lists will be nil, and this - charset shouldn't match. */ - - if (NILP (XVECTOR_DATA(Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset) - - MIN_LEADING_BYTE])) - { - return 0; - } + tags exist for which CHARSET-PREDICATE has been specified, then + that charset's entry in Vcharset_tag_lists will be nil, and this + charset shouldn't match. */ + + if (NILP (XVECTOR_DATA(Vcharset_tag_lists)[XCHARSET_LEADING_BYTE(charset) + - MIN_LEADING_BYTE])) + { + return 0; + } /* Now, find out what the pre-calculated value is. */ assoc = assq_no_quit(tag, XVECTOR_DATA(Vcharset_tag_lists) - [XCHARSET_LEADING_BYTE(charset) + [XCHARSET_LEADING_BYTE(charset) - MIN_LEADING_BYTE]); if (!(NILP(assoc)) && !(NILP(XCDR(assoc)))) @@ -1060,18 +1060,18 @@ } Lisp_Object -define_specifier_tag(Lisp_Object tag, Lisp_Object device_predicate, +define_specifier_tag(Lisp_Object tag, Lisp_Object device_predicate, Lisp_Object charset_predicate) { - Lisp_Object assoc = assq_no_quit (tag, Vuser_defined_tags), + Lisp_Object assoc = assq_no_quit (tag, Vuser_defined_tags), concons, devcons, charpres = Qnil; int recompute_devices = 0, recompute_charsets = 0, i, max_args = -1; if (NILP (assoc)) { recompute_devices = recompute_charsets = 1; - Vuser_defined_tags = Fcons (list3 (tag, device_predicate, - charset_predicate), + Vuser_defined_tags = Fcons (list3 (tag, device_predicate, + charset_predicate), Vuser_defined_tags); DEVICE_LOOP_NO_BREAK (devcons, concons) { @@ -1105,7 +1105,7 @@ invalid_argument ("Charset predicate must be able to take an argument", tag); } - + /* If there exists a charset_predicate for the tag currently (even if the new charset_predicate is nil), or if we're adding one, we need to recompute. This contrasts with the device predicates, where we @@ -1139,7 +1139,7 @@ } } - if (recompute_charsets) + if (recompute_charsets) { if (NILP(charset_predicate)) { @@ -1158,8 +1158,8 @@ if (!NILP(charset_predicate)) { - struct gcpro gcpro1; - charpres = make_vector(impossible, Qnil); + struct gcpro gcpro1; + charpres = make_vector(impossible, Qnil); GCPRO1 (charpres); /* If you want to extend the number of stages available, here @@ -1212,8 +1212,8 @@ } else { - XVECTOR_DATA(Vcharset_tag_lists)[i] - = Fcons(Fcons(tag, charpres), + XVECTOR_DATA(Vcharset_tag_lists)[i] + = Fcons(Fcons(tag, charpres), XVECTOR_DATA (Vcharset_tag_lists)[i]); } } @@ -1310,15 +1310,15 @@ assert(3 == list_len); device_predicate = XCADR(XCAR (rest)); - + if (NILP (device_predicate)) { - XCDR (XCAR (rest2)) = Qt; + XCDR (XCAR (rest2)) = Qt; } else { - device_predicate = !NILP (call_critical_lisp_code - (d, device_predicate, device)) + device_predicate = !NILP (call_critical_lisp_code + (d, device_predicate, device)) ? Qt : Qnil; XCDR (XCAR (rest2)) = device_predicate; } @@ -1329,7 +1329,7 @@ setup_charset_initial_specifier_tags (Lisp_Object charset) { Lisp_Object rest, charset_predicate, tag, new_value; - Lisp_Object charset_tag_list = Qnil; + Lisp_Object charset_tag_list = Qnil; LIST_LOOP (rest, Vuser_defined_tags) { @@ -1362,7 +1362,7 @@ \ } while (0) - SETUP_CHARSET_TAGS_FROB (initial); + SETUP_CHARSET_TAGS_FROB (initial); SETUP_CHARSET_TAGS_FROB (final); /* More later? */ @@ -2325,10 +2325,10 @@ where LOCALE := a window, a buffer, a frame, a device, or `global' TAG-SET := an unordered list of zero or more TAGS, each of which - is a symbol + is a symbol TAG := a device class (see `valid-device-class-p'), a device type - (see `valid-console-type-p'), or a tag defined with - `define-specifier-tag' + (see `valid-console-type-p'), or a tag defined with + `define-specifier-tag' INSTANTIATOR := format determined by the type of specifier The pair (TAG-SET . INSTANTIATOR) is called an `inst-pair'. @@ -2804,7 +2804,8 @@ Lisp_Object inst_list, Error_Behavior errb, int no_quit, Lisp_Object depth, - Lisp_Object *instantiator) + Lisp_Object *instantiator, + int no_fallback) { /* This function can GC */ Lisp_Specifier *sp; @@ -2866,7 +2867,7 @@ if (!device_matches_specifier_tag_set_p (device, tag_set)) { - continue; + continue; } val = XCDR (tagged_inst); @@ -2883,7 +2884,7 @@ val = call_with_suspended_errors ((lisp_fn_t) RAW_SPECMETH (sp, instantiate), Qunbound, Qspecifier, errb, 5, specifier, - matchspec, domain, val, depth); + matchspec, domain, val, depth, no_fallback); if (!UNBOUNDP (val)) { @@ -2922,7 +2923,7 @@ if (!device_matches_specifier_tag_set_p (device, tag_set)) { - continue; + continue; } val = XCDR (tagged_inst); @@ -2932,7 +2933,7 @@ val = call_with_suspended_errors ((lisp_fn_t) RAW_SPECMETH (sp, instantiate), Qunbound, Qspecifier, errb, 5, specifier, - matchspec, domain, val, depth); + matchspec, domain, val, depth, no_fallback); if (!UNBOUNDP (val)) { @@ -2951,7 +2952,7 @@ /* Given a SPECIFIER and a DOMAIN, return a specific instance for that specifier. Try to find one by checking the specifier types from most - specific (buffer) to most general (global). If we find an instance, + specific (window) to most general (global). If we find an instance, return it. Otherwise return Qunbound. */ #define CHECK_INSTANCE_ENTRY(key, matchspec, type) do { \ @@ -2963,7 +2964,7 @@ specifier_instance_from_inst_list (specifier, matchspec, \ domain, *CIE_inst_list, \ errb, no_quit, depth, \ - instantiator); \ + instantiator, no_fallback); \ if (!UNBOUNDP (CIE_val)) \ return CIE_val; \ } \ @@ -3075,7 +3076,8 @@ assert (CONSP (sp->fallback)); return specifier_instance_from_inst_list (specifier, matchspec, domain, sp->fallback, errb, no_quit, - depth, instantiator); + depth, instantiator, + no_fallback); } #undef CHECK_INSTANCE_ENTRY @@ -3245,7 +3247,7 @@ display table is not there. (Chartable specifiers are not yet implemented.) --- For font specifiers, MATCHSPEC should be a cons (CHARSET . STAGE). +-- For font specifiers, MATCHSPEC should be a cons (CHARSET . STAGE). The defined stages are currently `initial' and `final'. On X11, 'initial is used when the font matching process is looking for fonts that match the desired registries of the charset--see the `charset-registries' @@ -3308,7 +3310,7 @@ if (!NILP (built_up_list)) val = specifier_instance_from_inst_list (specifier, matchspec, domain, built_up_list, ERROR_ME, - 0, Qzero, &instantiator); + 0, Qzero, &instantiator, 0); UNGCPRO; return UNBOUNDP (val) ? default_ : want_instantiator ? instantiator : val; @@ -3329,7 +3331,7 @@ 0); } -DEFUN ("specifier-instantiator-from-inst-list", +DEFUN ("specifier-instantiator-from-inst-list", Fspecifier_instantiator_from_inst_list, 3, 4, 0, /* Attempt to convert an inst-list into an instance; return instantiator. This is identical to `specifier-instance-from-inst-list' but returns @@ -3923,5 +3925,5 @@ staticpro (&Vunlock_ghost_specifiers); Vcharset_tag_lists = make_vector(NUM_LEADING_BYTES, Qnil); - staticpro (&Vcharset_tag_lists); + staticpro (&Vcharset_tag_lists); } diff -r 71bf2c5667ba -r 66411359ce4e src/specifier.h --- a/src/specifier.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/specifier.h Sat Oct 25 21:40:46 2008 +0900 @@ -139,7 +139,7 @@ void (*validate_matchspec_method) (Lisp_Object matchspec); /* Instantiate method: Return SPECIFIER instance in DOMAIN, - specified by INSTANTIATOR. MATCHSPEC specifies an additional + specified by INSTANTIATOR. MATCHSPEC specifies additional constraints on the instance value (see the docstring for Fspecifier_matching_instance function). MATCHSPEC is passed Qunbound when no matching constraints are imposed. The method is @@ -152,6 +152,9 @@ name specifier_instance) to avoid creating "external" specification loops. + NO_FALLBACK indicates that the method should not try the fallbacks + (and thus simply return Qunbound) in case of a failure to instantiate. + This method must presume that both INSTANTIATOR and MATCHSPEC are already validated by the corresponding validate_* methods, and may abort if they are invalid. @@ -166,7 +169,8 @@ Lisp_Object matchspec, Lisp_Object domain, Lisp_Object instantiator, - Lisp_Object depth); + Lisp_Object depth, + int no_fallback); /* Going-to-add method: Called when an instantiator is about to be added to a specifier. This function can specify @@ -343,7 +347,7 @@ INITIALIZE_SPECIFIER_TYPE (type, obj_name, pred_sym); \ type##_specifier_methods->extra_data_size = \ sizeof (struct type##_specifier); \ - type##_specifier_methods->extra_description = \ + type##_specifier_methods->extra_description = \ &type##_specifier_description_0; \ } while (0) @@ -573,13 +577,13 @@ font for CHARSET that matches iso10646-1, since we haven't found a font that matches its registry." */ enum font_specifier_matchspec_stages { - initial, + initial, final, - impossible, + impossible, }; Lisp_Object define_specifier_tag(Lisp_Object tag, - Lisp_Object device_predicate, + Lisp_Object device_predicate, Lisp_Object charset_predicate); #endif /* INCLUDED_specifier_h_ */ diff -r 71bf2c5667ba -r 66411359ce4e src/strftime.c --- a/src/strftime.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/strftime.c Sat Oct 25 21:40:46 2008 +0900 @@ -58,6 +58,7 @@ %S second (00..61) %T time, 24-hour (hh:mm:ss) %X locale's time representation (%H:%M:%S) + %z time zone offset (e.g. +0530, -0800 etc) %Z time zone (EDT), or nothing if no time zone is determinable Date fields: @@ -70,10 +71,13 @@ %d day of month (01..31) %e day of month ( 1..31) %D date (mm/dd/yy) + %G year corresponding to the ISO 8601 week + %g Year of the ISO 8601 week within century (00 - 99) %h same as %b %j day of year (001..366) %m month (01..12) %U week number of year with Sunday as first day of week (00..53) + %V ISO 8601 week number (first week is the earliest one with Thu) %w day of week (0..6) %W week number of year with Monday as first day of week (00..53) %x locale's date representation (mm/dd/yy) @@ -235,6 +239,30 @@ return dl <= 0 ? 0 : dl / 7 + (dl % 7 != 0); } +#ifndef __isleap +/* Nonzero if YEAR is a leap year (every 4 years, + except every 100th isn't, and every 400th is). */ +# define __isleap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +#endif + +/* The number of days from the first day of the first ISO week of this + year to the year day YDAY with week day WDAY. ISO weeks start on + Monday; the first ISO week has the year's first Thursday. YDAY may + be as small as YDAY_MINIMUM. */ +#define ISO_WEEK_START_WDAY 1 /* Monday */ +#define ISO_WEEK1_WDAY 4 /* Thursday */ +#define YDAY_MINIMUM (-366) +static int +iso_week_days (int yday, int wday) +{ + /* Add enough to the first operand of % to make it nonnegative. */ + int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; + return (yday + - (yday - wday + ISO_WEEK1_WDAY + big_enough_multiple_of_7) % 7 + + ISO_WEEK1_WDAY - ISO_WEEK_START_WDAY); +} + #if !defined(HAVE_TM_ZONE) && !defined(HAVE_TZNAME) char *zone_name (const struct tm *tp); char * @@ -362,10 +390,125 @@ length += strftime (&string[length], max - length, "%H:%M:%S", tm); break; + + case 'V': + case 'g': + case 'G': + { + int year = tm->tm_year + 1900; + int days = iso_week_days (tm->tm_yday, tm->tm_wday); + + if (days < 0) + { + /* This ISO week belongs to the previous year. */ + year--; + days = + iso_week_days (tm->tm_yday + (365 + __isleap (year)), + tm->tm_wday); + } + else + { + int d = + iso_week_days (tm->tm_yday - (365 + __isleap (year)), + tm->tm_wday); + if (0 <= d) + { + /* This ISO week belongs to the next year. */ + year++; + days = d; + } + } + + switch (*format) + { + /* + #### FIXME + We really can't assume 1000 <= year <= 9999 + once time_t gets beyond 32 bits, but it's true + of the rest of the code here so get with the + program + */ + case 'g': + length += + add_num2 (&string[length], year % 100, + max - length, pad); + break; + + case 'G': + add_char (year / 1000 + '0'); + length += add_num3 (&string[length], year % 1000, + max - length, zero); + break; + + default: + length += + add_num2 (&string[length], days / 7 + 1, + max - length, pad); + break; + } + } + break; case 'X': length += strftime (&string[length], max - length, "%H:%M:%S", tm); break; + case 'z': + { + /* + #### FIXME: could use tm->tm_gmtoff if present. Since + the other code in xemacs does not do so we follow the + leaders (and don't add a autoconf macro to detect + its presence). + */ + long int offset; + long int minutes; + struct tm lt, *ut; + time_t utc; + + lt = *tm; + utc = mktime(<); + ut = gmtime(&utc); + /* assume that tm is valid so the others will be too! */ + assert( utc != (time_t) -1 && ut != NULL ); + + /* tm diff code below is based on mktime.c, glibc 2.3.2 */ + { + int lt4, ut4, lt100, ut100, lt400, ut400; + int intervening_leap_days, years, days; + + lt4 = (lt.tm_year >> 2) + (1900 >> 2) - + ! (lt.tm_year & 3); + ut4 = (ut->tm_year >> 2) + (1900 >> 2) - + ! (ut->tm_year & 3); + lt100 = lt4 / 25 - (lt4 % 25 < 0); + ut100 = ut4 / 25 - (ut4 % 25 < 0); + lt400 = lt100 >> 2; + ut400 = ut100 >> 2; + intervening_leap_days = + (lt4 - ut4) - (lt100 - ut100) + (lt400 - ut400); + years = lt.tm_year - ut->tm_year; + days = (365 * years + intervening_leap_days + + (lt.tm_yday - ut->tm_yday)); + offset = (60 * (60 * (24 * days + (lt.tm_hour - ut->tm_hour)) + + (lt.tm_min - ut->tm_min)) + + (lt.tm_sec - ut->tm_sec)); + } + + minutes = offset / ( offset < 0 ? -60 : 60 ); + + add_char ((offset < 0 ? '-' : '+')); + + if ( minutes / 600 != 0 ) + add_char (minutes / 600 + '0'); + else if ( pad != none ) + add_char ((pad == zero ? '0' : ' ')); + + length += + add_num3 (&string[length], + ((minutes / 60 ) % 10) * 100 + (minutes % 60), + max - length, pad); + break; + } case 'Z': #ifdef HAVE_TM_ZONE length += add_str (&string[length], tm->tm_zone, max - length); diff -r 71bf2c5667ba -r 66411359ce4e src/sunpro.c --- a/src/sunpro.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/sunpro.c Sat Oct 25 21:40:46 2008 +0900 @@ -21,6 +21,12 @@ /* Synched up with: Not in FSF. */ +/* Commentary: + +According to Paul Keusemann in <20070802140358.GA19566@visi.com>, this +feature probably still works as of 2007-08-02. However, that doesn't seem +reliable since there doesn't seem to be a way to configure it! */ + #include #include "lisp.h" @@ -51,6 +57,7 @@ #else (int UNUSED (nargs), Lisp_Object *UNUSED (args)) #endif + ) { #ifdef USAGE_TRACKING Lisp_Object xs; diff -r 71bf2c5667ba -r 66411359ce4e src/symbols.c --- a/src/symbols.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/symbols.c Sat Oct 25 21:40:46 2008 +0900 @@ -84,6 +84,9 @@ static Lisp_Object *value_slot_past_magic (Lisp_Object sym); static Lisp_Object follow_varalias_pointers (Lisp_Object symbol, Lisp_Object follow_past_lisp_magic); +static Lisp_Object map_varalias_chain (Lisp_Object symbol, + Lisp_Object follow_past_lisp_magic, + Lisp_Object (*fn) (Lisp_Object arg)); static Lisp_Object @@ -256,17 +259,17 @@ return object; } -DEFUN ("intern-soft", Fintern_soft, 1, 2, 0, /* +DEFUN ("intern-soft", Fintern_soft, 1, 3, 0, /* Return the canonical symbol named NAME, or nil if none exists. NAME may be a string or a symbol. If it is a symbol, that exact symbol is searched for. Optional second argument OBARRAY specifies the obarray to use; it defaults to the value of the variable `obarray'. +Optional third argument DEFAULT says what Lisp object to return if there is +no canonical symbol named NAME, and defaults to nil. */ - (name, obarray)) + (name, obarray, default_)) { - /* #### Bug! (intern-soft "nil") returns nil. Perhaps we should - add a DEFAULT-IF-NOT-FOUND arg, like in get. */ Lisp_Object tem; Lisp_Object string; @@ -283,7 +286,7 @@ tem = oblookup (obarray, XSTRING_DATA (string), XSTRING_LENGTH (string)); if (INTP (tem) || (SYMBOLP (name) && !EQ (name, tem))) - return Qnil; + return default_; else return tem; } @@ -732,6 +735,26 @@ return make_string ((const Ibyte *)name, strlen (name)); } +DEFUN ("special-form-p", Fspecial_form_p, 1, 1, 0, /* +Return whether SUBR is a special form. + +A special form is a built-in function (a subr, that is a function +implemented in C, not Lisp) which does not necessarily evaluate all its +arguments. Much of the basic XEmacs Lisp syntax is implemented by means of +special forms; examples are `let', `condition-case', `defun', `setq' and so +on. + +If you intend to write a Lisp function that does not necessarily evaluate +all its arguments, the portable (across emacs variants, and across Lisp +implementations) way to go about it is to write a macro instead. See +`defmacro' and `backquote'. +*/ + (subr)) +{ + subr = indirect_function (subr, 0); + return (SUBRP (subr) && XSUBR (subr)->max_args == UNEVALLED) ? Qt : Qnil; +} + DEFUN ("setplist", Fsetplist, 2, 2, 0, /* Set SYMBOL's property list to NEWPLIST, and return NEWPLIST. */ @@ -2734,6 +2757,78 @@ else return local_info != 0 ? Qt : Qnil; } + +DEFUN ("custom-variable-p", Fcustom_variable_p, 1, 1, 0, /* +Return non-nil if SYMBOL names a custom variable. +Does not follow the variable alias chain. +*/ + (symbol)) +{ + return (!(NILP (Fget(symbol, intern ("standard-value"), Qnil))) + || !(NILP (Fget(symbol, intern ("custom-autoload"), Qnil)))) ? + Qt: Qnil; +} + +static Lisp_Object +user_variable_alias_check_fun (Lisp_Object symbol) +{ + Lisp_Object documentation = Fget (symbol, Qvariable_documentation, Qnil); + + if ((INTP (documentation) && XINT (documentation) < 0) || + (STRINGP (documentation) && + (string_byte (documentation, 0) == '*')) || + /* If (STRING . INTEGER), a negative integer means a user variable. */ + (CONSP (documentation) + && STRINGP (XCAR (documentation)) + && INTP (XCDR (documentation)) + && XINT (XCDR (documentation)) < 0) || + !NILP (Fcustom_variable_p (symbol))) + { + return make_int(1); + } + + return Qzero; +} + +DEFUN ("user-variable-p", Fuser_variable_p, 1, 1, 0, /* +Return t if SYMBOL names a variable intended to be set and modified by users. +\(The alternative is a variable used internally in a Lisp program.) +A symbol names a user variable if +\(1) the first character of its documentation is `*', or +\(2) it is customizable (`custom-variable-p' gives t), or +\(3) it names a variable alias that eventually resolves to another user variable. + +The GNU Emacs implementation of `user-variable-p' returns nil if there is a +loop in the chain of symbols. Since this is indistinguishable from the case +where a symbol names a non-user variable, XEmacs signals a +`cyclic-variable-indirection' error instead; use `condition-case' to catch +this error if you really want to avoid this. +*/ + (symbol)) +{ + Lisp_Object mapped; + + if (!SYMBOLP (symbol)) + { + return Qnil; + } + + /* Called for its side-effects, we want it to signal if there's a loop. */ + follow_varalias_pointers (symbol, Qt); + + /* Look through the various aliases. */ + mapped = map_varalias_chain (symbol, Qt, user_variable_alias_check_fun); + if (EQ (Qzero, mapped)) + { + return Qnil; + } + + assert (EQ (make_int (1), mapped)); + + return Qt; +} + + /* @@ -3116,20 +3211,98 @@ return hare; } -DEFUN ("defvaralias", Fdefvaralias, 2, 2, 0, /* +/* Map FN over the chain of variable aliases for SYMBOL. If FN returns + something other than Qzero for some link in the chain, return that + immediately. Otherwise return Qzero (which is not a symbol). + + FN may be called twice on the same symbol if the varalias chain is + cyclic. Prevent this by calling follow_varalias_pointers first for its + side-effects. + + Signals a cyclic-variable-indirection error if a cyclic structure is + detected. */ + +static Lisp_Object +map_varalias_chain (Lisp_Object symbol, + Lisp_Object follow_past_lisp_magic, + Lisp_Object (*fn) (Lisp_Object arg)) +{ +#define VARALIAS_INDIRECTION_SUSPICION_LENGTH 16 + Lisp_Object tortoise, hare, val, res; + int count; + + assert (fn); + + /* quick out just in case */ + if (!SYMBOL_VALUE_MAGIC_P (XSYMBOL (symbol)->value)) + { + return (fn)(symbol); + } + + /* Compare implementation of indirect_function(). */ + for (hare = tortoise = symbol, count = 0; + val = fetch_value_maybe_past_magic (hare, follow_past_lisp_magic), + SYMBOL_VALUE_VARALIAS_P (val); + hare = symbol_value_varalias_aliasee (XSYMBOL_VALUE_VARALIAS (val)), + count++) + { + res = (fn) (hare); + if (!EQ (Qzero, res)) + { + return res; + } + + if (count < VARALIAS_INDIRECTION_SUSPICION_LENGTH) continue; + + if (count & 1) + tortoise = symbol_value_varalias_aliasee + (XSYMBOL_VALUE_VARALIAS (fetch_value_maybe_past_magic + (tortoise, follow_past_lisp_magic))); + if (EQ (hare, tortoise)) + return Fsignal (Qcyclic_variable_indirection, list1 (symbol)); + } + + return (fn) (hare); +} + +/* + +OED entry, 2nd edition, IPA transliterated using Kirshenbaum: + +alias ('eIlI@s, '&lI@s), adv. and n. +[...] +B. n. (with pl. aliases.) +1. Another name, an assumed name. +1605 Camden Rem. (1614) 147 An Alias or double name cannot preiudice the honest. +1831 Edin. Rev. LIII. 364 He has been assuming various aliases. +1861 Macaulay Hist. Eng. V. 92 The monk who was sometimes called Harrison +and sometimes went by the alias of Johnson. + +The alias is the fake name. Let's try to follow that usage in our +documentation. + +*/ + +DEFUN ("defvaralias", Fdefvaralias, 2, 3, 0, /* Define a variable as an alias for another variable. Thenceforth, any operations performed on VARIABLE will actually be -performed on ALIAS. Both VARIABLE and ALIAS should be symbols. -If ALIAS is nil, remove any aliases for VARIABLE. -ALIAS can itself be aliased, and the chain of variable aliases +performed on ALIASED. Both VARIABLE and ALIASED should be symbols. +If ALIASED is nil and VARIABLE is an existing alias, remove that alias. +ALIASED can itself be an alias, and the chain of variable aliases will be followed appropriately. If VARIABLE already has a value, this value will be shadowed until the alias is removed, at which point it will be restored. Currently VARIABLE cannot be a built-in variable, a variable that has a buffer-local value in any buffer, or the symbols nil or t. -\(ALIAS, however, can be any type of variable.) +\(ALIASED, however, can be any type of variable.) + +Optional argument DOCSTRING is documentation for VARIABLE in its use as an +alias for ALIASED. The XEmacs help code ignores this documentation, using +the documentation of ALIASED instead, and the docstring, if specified, is +not shadowed in the same way that the value is. Only use it if you know +what you're doing. */ - (variable, alias)) + (variable, aliased, docstring)) { struct symbol_value_varalias *bfwd; Lisp_Object valcontents; @@ -3139,7 +3312,7 @@ valcontents = XSYMBOL (variable)->value; - if (NILP (alias)) + if (NILP (aliased)) { if (SYMBOL_VALUE_VARALIAS_P (valcontents)) { @@ -3150,11 +3323,15 @@ return Qnil; } - CHECK_SYMBOL (alias); + CHECK_SYMBOL (aliased); + + if (!NILP (docstring)) + Fput (variable, Qvariable_documentation, docstring); + if (SYMBOL_VALUE_VARALIAS_P (valcontents)) { /* transmogrify */ - XSYMBOL_VALUE_VARALIAS (valcontents)->aliasee = alias; + XSYMBOL_VALUE_VARALIAS (valcontents)->aliasee = aliased; return Qnil; } @@ -3166,7 +3343,7 @@ bfwd = ALLOC_LCRECORD_TYPE (struct symbol_value_varalias, &lrecord_symbol_value_varalias); bfwd->magic.type = SYMVAL_VARALIAS; - bfwd->aliasee = alias; + bfwd->aliasee = aliased; bfwd->shadowed = valcontents; valcontents = wrap_symbol_value_magic (bfwd); @@ -3175,8 +3352,8 @@ } DEFUN ("variable-alias", Fvariable_alias, 1, 2, 0, /* -If VARIABLE is aliased to another variable, return that variable. -VARIABLE should be a symbol. If VARIABLE is not aliased, return nil. +If VARIABLE is an alias of another variable, return that variable. +VARIABLE should be a symbol. If VARIABLE is not an alias, return nil. Variable aliases are created with `defvaralias'. See also `indirect-variable'. */ @@ -3719,6 +3896,7 @@ DEFSUBR (Fdefine_function); Ffset (intern ("defalias"), intern ("define-function")); DEFSUBR (Fsubr_name); + DEFSUBR (Fspecial_form_p); DEFSUBR (Fsetplist); DEFSUBR (Fsymbol_value_in_buffer); DEFSUBR (Fsymbol_value_in_console); @@ -3734,6 +3912,8 @@ DEFSUBR (Fkill_local_variable); DEFSUBR (Fkill_console_local_variable); DEFSUBR (Flocal_variable_p); + DEFSUBR (Fcustom_variable_p); + DEFSUBR (Fuser_variable_p); DEFSUBR (Fdefvaralias); DEFSUBR (Fvariable_alias); DEFSUBR (Findirect_variable); diff -r 71bf2c5667ba -r 66411359ce4e src/syntax.c --- a/src/syntax.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/syntax.c Sat Oct 25 21:40:46 2008 +0900 @@ -542,12 +542,10 @@ void uninit_buffer_syntax_cache (struct buffer *buf) { -#ifdef NEW_GC - mc_free (buf->syntax_cache); -#else /* not NEW_GC */ +#ifndef NEW_GC xfree (buf->syntax_cache, struct syntax_cache *); + buf->syntax_cache = 0; #endif /* not NEW_GC */ - buf->syntax_cache = 0; } /* extent-specific APIs used in extents.c and insdel.c */ diff -r 71bf2c5667ba -r 66411359ce4e src/sysdep.h --- a/src/sysdep.h Sat Oct 25 20:35:36 2008 +0900 +++ b/src/sysdep.h Sat Oct 25 21:40:46 2008 +0900 @@ -26,10 +26,6 @@ #include -#ifndef WIN32_NATIVE -extern char **environ; -#endif - #ifdef PDUMP int pdump_read_file (char **pdump_start_pos, size_t *pdump_length); #endif @@ -68,6 +64,10 @@ BEGIN_C_DECLS +#ifndef WIN32_NATIVE +extern char **environ; +#endif + void stop_interrupts (void); void start_interrupts (void); MODULE_API void slow_down_interrupts (void); diff -r 71bf2c5667ba -r 66411359ce4e src/tests.c --- a/src/tests.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/tests.c Sat Oct 25 21:40:46 2008 +0900 @@ -37,7 +37,6 @@ static Lisp_Object Vtest_function_list; - DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0, "", /* Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT() */ @@ -70,6 +69,9 @@ /* Check for expected strings before and after conversion. Conversions depend on whether MULE is defined. */ + + /* #### Any code below that uses iso-latin-2-with-esc is ill-conceived. */ + #ifdef MULE #define DFC_CHECK_DATA_COND_MULE(ptr,len, \ constant_string_mule, \ @@ -137,7 +139,7 @@ ptr = NULL, len = rand(); TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1, ALLOCA, (ptr, len), - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (ptr, len, ext_latin12); ptr = NULL, len = rand(); @@ -155,34 +157,34 @@ ptr = NULL, len = rand(); TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), ALLOCA, (ptr, len), - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (ptr, len, int_latin2); ptr = NULL, len = rand(); TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), MALLOC, (ptr, len), - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (ptr, len, int_latin2); xfree (ptr, void *); TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1), LISP_STRING, string, - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin, LISP_STRING, string, - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, LISP_STRING, string, - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2); TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin, LISP_BUFFER, Fcurrent_buffer(), - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)), sizeof (int_latin2), int_latin2); @@ -194,7 +196,7 @@ TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1), ALLOCA, (ptr, len), - intern ("iso-8859-2")); + intern ("iso-latin-2-with-esc")); DFC_CHECK_DATA (ptr, len, int_latin1); #endif /* MULE */ diff -r 71bf2c5667ba -r 66411359ce4e src/text.c --- a/src/text.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/text.c Sat Oct 25 21:40:46 2008 +0900 @@ -245,7 +245,7 @@ @item The Eistring API -(This API is currently under-used) When doing simple things with +\(This API is currently under-used) When doing simple things with internal text, the basic internal-format API's are enough. But to do things like delete or replace a substring, concatenate various strings, etc. is difficult to do cleanly because of the allocation issues. diff -r 71bf2c5667ba -r 66411359ce4e src/text.h diff -r 71bf2c5667ba -r 66411359ce4e src/unicode.c --- a/src/unicode.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/unicode.c Sat Oct 25 21:40:46 2008 +0900 @@ -146,13 +146,6 @@ (1) User-defined charsets: It would be inconvenient to require all dumped user-defined charsets to be reloaded at init time. - (2) Starting up in a non-ISO-8859-1 directory. If we load at run-time, - we don't load the tables until after we've parsed the current - directories, and we run into a real bootstrapping problem, if the - directories themselves are non-ISO-8859-1. This is potentially fixable - once we switch to using Unicode internally, so we don't have to do any - conversion (other than the automatic kind, e.g. UTF-16 to UTF-8). - NB With run-time loading, we load in init-mule-at-startup, in mule-cmds.el. This is called from startup.el, which is quite late in the initialization process -- but data-directory isn't set until then. @@ -192,7 +185,7 @@ convert them back.) */ Lisp_Object Qunicode; -Lisp_Object Qutf_16, Qutf_8, Qucs_4, Qutf_7; +Lisp_Object Qutf_16, Qutf_8, Qucs_4, Qutf_7, Qutf_32; Lisp_Object Qneed_bom; Lisp_Object Qutf_16_little_endian, Qutf_16_bom; @@ -218,10 +211,6 @@ trail = 0xDC00 + (__ctu16s_code & 0x3FF); \ } while (0) -#define valid_utf_16_first_surrogate(ch) (((ch) & 0xFC00) == 0xD800) -#define valid_utf_16_last_surrogate(ch) (((ch) & 0xFC00) == 0xDC00) -#define valid_utf_16_surrogate(ch) (((ch) & 0xF800) == 0xD800) - #ifdef MULE /* Using ints for to_unicode is OK (as long as they are >= 32 bits). @@ -347,6 +336,11 @@ Lisp_Object Qlast_allocated_character; Lisp_Object Qccl_encode_to_ucs_2; +Lisp_Object Vnumber_of_jit_charsets; +Lisp_Object Vlast_jit_charset_final; +Lisp_Object Vcharset_descr; + + /************************************************************************/ /* Unicode implementation */ @@ -1091,8 +1085,6 @@ int code_levels; int i; int n = Dynarr_length (charsets); - static int number_of_jit_charsets; - static Ascbyte last_jit_charset_final; type_checking_assert (code >= 0); /* This shortcut depends on the representation of an Ichar, see text.c. @@ -1135,33 +1127,21 @@ (-1 == (i = get_free_codepoint(Vcurrent_jit_charset)))) { Ibyte setname[32]; - Lisp_Object charset_descr = build_string - ("Mule charset for otherwise unknown Unicode code points."); - - struct gcpro gcpro1; - - if ('\0' == last_jit_charset_final) - { - /* This final byte shit is, umm, not that cool. */ - last_jit_charset_final = 0x30; - } + int number_of_jit_charsets = XINT (Vnumber_of_jit_charsets); + Ascbyte last_jit_charset_final = XCHAR (Vlast_jit_charset_final); + + /* This final byte shit is, umm, not that cool. */ + assert (last_jit_charset_final >= 0x30); /* Assertion added partly because our Win32 layer doesn't support snprintf; with this, we're sure it won't overflow the buffer. */ assert(100 > number_of_jit_charsets); - qxesprintf(setname, "jit-ucs-charset-%d", number_of_jit_charsets++); - - /* Aside: GCPROing here would be overkill according to the FSF's - philosophy. make-charset cannot currently GC, but is intended - to be called from Lisp, with its arguments protected by the - Lisp reader. We GCPRO in case it GCs in the future and no-one - checks all the C callers. */ - - GCPRO1 (charset_descr); + qxesprintf(setname, "jit-ucs-charset-%d", number_of_jit_charsets); + Vcurrent_jit_charset = Fmake_charset - (intern((const CIbyte *)setname), charset_descr, + (intern((const CIbyte *)setname), Vcharset_descr, /* Set encode-as-utf-8 to t, to have this character set written using UTF-8 escapes in escape-quoted and ctext. This sidesteps the fact that our internal character -> Unicode @@ -1170,11 +1150,15 @@ nconc2 (list6(Qcolumns, make_int(1), Qchars, make_int(96), Qdimension, make_int(2)), list6(Qregistries, Qunicode_registries, - Qfinal, make_char(last_jit_charset_final++), + Qfinal, make_char(last_jit_charset_final), /* This CCL program is initialised in unicode.el. */ Qccl_program, Qccl_encode_to_ucs_2)))); - UNGCPRO; + + /* Record for the Unicode infrastructure that we've created + this character set. */ + Vnumber_of_jit_charsets = make_int (number_of_jit_charsets + 1); + Vlast_jit_charset_final = make_char (last_jit_charset_final + 1); i = get_free_codepoint(Vcurrent_jit_charset); } @@ -1432,10 +1416,15 @@ If the CODE would not otherwise be converted to an XEmacs character, and the list of character sets to be consulted is nil or the default, a new XEmacs character will be created for it in one of the `jit-ucs-charset' Mule -character sets, and that character will be returned. There is scope for -tens of thousands of separate Unicode code points in every session using -this technique, so despite XEmacs' internal encoding not being based on -Unicode, your data won't be trashed. +character sets, and that character will be returned. + +This is limited to around 400,000 characters per XEmacs session, though, so +while normal usage will not be problematic, things like: + +\(dotimes (i #x110000) (decode-char 'ucs i)) + +will eventually error. The long-term solution to this is Unicode as an +internal encoding. */ (code, USED_IF_MULE (charsets))) { @@ -1703,6 +1692,7 @@ { /* decode */ unsigned char counter; + unsigned char indicated_length; int seen_char; /* encode */ Lisp_Object current_charset; @@ -1716,11 +1706,6 @@ DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (unicode); -/* Decode a UCS-2 or UCS-4 character into a buffer. If the lookup fails, use - (U+3013) of JIS X 0208, which means correct character - is not found, instead. - #### do something more appropriate (use blob?) - Danger, Will Robinson! Data loss. Should we signal user? */ static void decode_unicode_char (int ch, unsigned_char_dynarr *dst, struct unicode_coding_stream *data, @@ -1755,9 +1740,32 @@ data->seen_char = 1; } +#define DECODE_ERROR_OCTET(octet, dst, data, ignore_bom) \ + decode_unicode_char ((octet) + UNICODE_ERROR_OCTET_RANGE_START, \ + dst, data, ignore_bom) + +static inline void +indicate_invalid_utf_8 (unsigned char indicated_length, + unsigned char counter, + int ch, unsigned_char_dynarr *dst, + struct unicode_coding_stream *data, + unsigned int ignore_bom) +{ + Binbyte stored = indicated_length - counter; + Binbyte mask = "\x00\x00\xC0\xE0\xF0\xF8\xFC"[indicated_length]; + + while (stored > 0) + { + DECODE_ERROR_OCTET (((ch >> (6 * (stored - 1))) & 0x3f) | mask, + dst, data, ignore_bom); + mask = 0x80, stored--; + } +} + static void encode_unicode_char_1 (int code, unsigned_char_dynarr *dst, - enum unicode_type type, unsigned int little_endian) + enum unicode_type type, unsigned int little_endian, + int write_error_characters_as_such) { switch (type) { @@ -1767,53 +1775,105 @@ if (code < 0x10000) { Dynarr_add (dst, (unsigned char) (code & 255)); Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); - } else { - /* Little endian; least significant byte first. */ - int first, second; - - CODE_TO_UTF_16_SURROGATES(code, first, second); - - Dynarr_add (dst, (unsigned char) (first & 255)); - Dynarr_add (dst, (unsigned char) ((first >> 8) & 255)); - - Dynarr_add (dst, (unsigned char) (second & 255)); - Dynarr_add (dst, (unsigned char) ((second >> 8) & 255)); - } + } else if (write_error_characters_as_such && + code >= UNICODE_ERROR_OCTET_RANGE_START && + code < (UNICODE_ERROR_OCTET_RANGE_START + 0x100)) + { + Dynarr_add (dst, (unsigned char) ((code & 0xFF))); + } + else if (code < 0x110000) + { + /* Little endian; least significant byte first. */ + int first, second; + + CODE_TO_UTF_16_SURROGATES(code, first, second); + + Dynarr_add (dst, (unsigned char) (first & 255)); + Dynarr_add (dst, (unsigned char) ((first >> 8) & 255)); + + Dynarr_add (dst, (unsigned char) (second & 255)); + Dynarr_add (dst, (unsigned char) ((second >> 8) & 255)); + } + else + { + /* Not valid Unicode. Pass U+FFFD, least significant byte + first. */ + Dynarr_add (dst, (unsigned char) 0xFD); + Dynarr_add (dst, (unsigned char) 0xFF); + } } else { if (code < 0x10000) { Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); Dynarr_add (dst, (unsigned char) (code & 255)); - } else { - /* Big endian; most significant byte first. */ - int first, second; - - CODE_TO_UTF_16_SURROGATES(code, first, second); - - Dynarr_add (dst, (unsigned char) ((first >> 8) & 255)); - Dynarr_add (dst, (unsigned char) (first & 255)); - - Dynarr_add (dst, (unsigned char) ((second >> 8) & 255)); - Dynarr_add (dst, (unsigned char) (second & 255)); - } + } else if (write_error_characters_as_such && + code >= UNICODE_ERROR_OCTET_RANGE_START && + code < (UNICODE_ERROR_OCTET_RANGE_START + 0x100)) + { + Dynarr_add (dst, (unsigned char) ((code & 0xFF))); + } + else if (code < 0x110000) + { + /* Big endian; most significant byte first. */ + int first, second; + + CODE_TO_UTF_16_SURROGATES(code, first, second); + + Dynarr_add (dst, (unsigned char) ((first >> 8) & 255)); + Dynarr_add (dst, (unsigned char) (first & 255)); + + Dynarr_add (dst, (unsigned char) ((second >> 8) & 255)); + Dynarr_add (dst, (unsigned char) (second & 255)); + } + else + { + /* Not valid Unicode. Pass U+FFFD, most significant byte + first. */ + Dynarr_add (dst, (unsigned char) 0xFF); + Dynarr_add (dst, (unsigned char) 0xFD); + } } break; case UNICODE_UCS_4: + case UNICODE_UTF_32: if (little_endian) { - Dynarr_add (dst, (unsigned char) (code & 255)); - Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); - Dynarr_add (dst, (unsigned char) ((code >> 16) & 255)); - Dynarr_add (dst, (unsigned char) (code >> 24)); + if (write_error_characters_as_such && + code >= UNICODE_ERROR_OCTET_RANGE_START && + code < (UNICODE_ERROR_OCTET_RANGE_START + 0x100)) + { + Dynarr_add (dst, (unsigned char) ((code & 0xFF))); + } + else + { + /* We generate and accept incorrect sequences here, which is + okay, in the interest of preservation of the user's + data. */ + Dynarr_add (dst, (unsigned char) (code & 255)); + Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); + Dynarr_add (dst, (unsigned char) ((code >> 16) & 255)); + Dynarr_add (dst, (unsigned char) (code >> 24)); + } } else { - Dynarr_add (dst, (unsigned char) (code >> 24)); - Dynarr_add (dst, (unsigned char) ((code >> 16) & 255)); - Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); - Dynarr_add (dst, (unsigned char) (code & 255)); + if (write_error_characters_as_such && + code >= UNICODE_ERROR_OCTET_RANGE_START && + code < (UNICODE_ERROR_OCTET_RANGE_START + 0x100)) + { + Dynarr_add (dst, (unsigned char) ((code & 0xFF))); + } + else + { + /* We generate and accept incorrect sequences here, which is okay, + in the interest of preservation of the user's data. */ + Dynarr_add (dst, (unsigned char) (code >> 24)); + Dynarr_add (dst, (unsigned char) ((code >> 16) & 255)); + Dynarr_add (dst, (unsigned char) ((code >> 8) & 255)); + Dynarr_add (dst, (unsigned char) (code & 255)); + } } break; @@ -1842,11 +1902,25 @@ } else if (code <= 0x3ffffff) { - Dynarr_add (dst, (unsigned char) ((code >> 24) | 0xf8)); - Dynarr_add (dst, (unsigned char) (((code >> 18) & 0x3f) | 0x80)); - Dynarr_add (dst, (unsigned char) (((code >> 12) & 0x3f) | 0x80)); - Dynarr_add (dst, (unsigned char) (((code >> 6) & 0x3f) | 0x80)); - Dynarr_add (dst, (unsigned char) ((code & 0x3f) | 0x80)); + +#if !(UNICODE_ERROR_OCTET_RANGE_START > 0x1fffff \ + && UNICODE_ERROR_OCTET_RANGE_START < 0x3ffffff) +#error "This code needs to be rewritten. " +#endif + if (write_error_characters_as_such && + code >= UNICODE_ERROR_OCTET_RANGE_START && + code < (UNICODE_ERROR_OCTET_RANGE_START + 0x100)) + { + Dynarr_add (dst, (unsigned char) ((code & 0xFF))); + } + else + { + Dynarr_add (dst, (unsigned char) ((code >> 24) | 0xf8)); + Dynarr_add (dst, (unsigned char) (((code >> 18) & 0x3f) | 0x80)); + Dynarr_add (dst, (unsigned char) (((code >> 12) & 0x3f) | 0x80)); + Dynarr_add (dst, (unsigned char) (((code >> 6) & 0x3f) | 0x80)); + Dynarr_add (dst, (unsigned char) ((code & 0x3f) | 0x80)); + } } else { @@ -1870,7 +1944,8 @@ void encode_unicode_char (Lisp_Object USED_IF_MULE (charset), int h, int USED_IF_MULE (l), unsigned_char_dynarr *dst, - enum unicode_type type, unsigned int little_endian) + enum unicode_type type, unsigned int little_endian, + int write_error_characters_as_such) { #ifdef MULE int code = ichar_to_unicode (make_ichar (charset, h & 127, l & 127)); @@ -1896,7 +1971,8 @@ int code = h; #endif /* MULE */ - encode_unicode_char_1 (code, dst, type, little_endian); + encode_unicode_char_1 (code, dst, type, little_endian, + write_error_characters_as_such); } static Bytecount @@ -1915,6 +1991,8 @@ if (str->direction == CODING_DECODE) { unsigned char counter = data->counter; + unsigned char indicated_length + = data->indicated_length; while (n--) { @@ -1923,46 +2001,92 @@ switch (type) { case UNICODE_UTF_8: - switch (counter) - { - case 0: - if (c >= 0xfc) - { - ch = c & 0x01; - counter = 5; - } - else if (c >= 0xf8) - { - ch = c & 0x03; - counter = 4; - } - else if (c >= 0xf0) - { - ch = c & 0x07; - counter = 3; - } - else if (c >= 0xe0) - { - ch = c & 0x0f; - counter = 2; - } - else if (c >= 0xc0) - { - ch = c & 0x1f; - counter = 1; - } - else - decode_unicode_char (c, dst, data, ignore_bom); - break; - case 1: - ch = (ch << 6) | (c & 0x3f); - decode_unicode_char (ch, dst, data, ignore_bom); - ch = 0; - counter = 0; - break; - default: - ch = (ch << 6) | (c & 0x3f); - counter--; + if (0 == counter) + { + if (0 == (c & 0x80)) + { + /* ASCII. */ + decode_unicode_char (c, dst, data, ignore_bom); + } + else if (0 == (c & 0x40)) + { + /* Highest bit set, second highest not--there's + something wrong. */ + DECODE_ERROR_OCTET (c, dst, data, ignore_bom); + } + else if (0 == (c & 0x20)) + { + ch = c & 0x1f; + counter = 1; + indicated_length = 2; + } + else if (0 == (c & 0x10)) + { + ch = c & 0x0f; + counter = 2; + indicated_length = 3; + } + else if (0 == (c & 0x08)) + { + ch = c & 0x0f; + counter = 3; + indicated_length = 4; + } + else + { + /* We don't supports lengths longer than 4 in + external-format data. */ + DECODE_ERROR_OCTET (c, dst, data, ignore_bom); + + } + } + else + { + /* counter != 0 */ + if ((0 == (c & 0x80)) || (0 != (c & 0x40))) + { + indicate_invalid_utf_8(indicated_length, + counter, + ch, dst, data, ignore_bom); + if (c & 0x80) + { + DECODE_ERROR_OCTET (c, dst, data, ignore_bom); + } + else + { + /* The character just read is ASCII. Treat it as + such. */ + decode_unicode_char (c, dst, data, ignore_bom); + } + ch = 0; + counter = 0; + } + else + { + ch = (ch << 6) | (c & 0x3f); + counter--; + /* Just processed the final byte. Emit the character. */ + if (!counter) + { + /* Don't accept over-long sequences, surrogates, + or codes above #x10FFFF. */ + if ((ch < 0x80) || + ((ch < 0x800) && indicated_length > 2) || + ((ch < 0x10000) && indicated_length > 3) || + valid_utf_16_surrogate(ch) || (ch > 0x110000)) + { + indicate_invalid_utf_8(indicated_length, + counter, + ch, dst, data, + ignore_bom); + } + else + { + decode_unicode_char (ch, dst, data, ignore_bom); + } + ch = 0; + } + } } break; @@ -1972,39 +2096,51 @@ ch = (c << counter) | ch; else ch = (ch << 8) | c; + counter += 8; - if (counter == 16 && valid_utf_16_first_surrogate(ch)) - break; - - if (counter == 16) - { + if (16 == counter) + { int tempch = ch; + + if (valid_utf_16_first_surrogate(ch)) + { + break; + } ch = 0; counter = 0; decode_unicode_char (tempch, dst, data, ignore_bom); } - if (counter == 32) + else if (32 == counter) { int tempch; - /* #### Signalling an error may be a bit extreme. Should - we try and read it in anyway? */ - if (!valid_utf_16_first_surrogate(ch >> 16) - || !valid_utf_16_last_surrogate(ch & 0xFFFF)) + + if (!valid_utf_16_last_surrogate(ch & 0xFFFF)) { - signal_error(Qtext_conversion_error, - "Invalid UTF-16 surrogate sequence", - Qunbound); + DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); } - tempch = utf_16_surrogates_to_code((ch >> 16), - (ch & 0xffff)); + else + { + tempch = utf_16_surrogates_to_code((ch >> 16), + (ch & 0xffff)); + decode_unicode_char(tempch, dst, data, ignore_bom); + } ch = 0; counter = 0; - decode_unicode_char(tempch, dst, data, ignore_bom); - } + } + else + assert(8 == counter || 24 == counter); break; case UNICODE_UCS_4: + case UNICODE_UTF_32: if (little_endian) ch = (c << counter) | ch; else @@ -2012,15 +2148,43 @@ counter += 8; if (counter == 32) { - int tempch = ch; + if (ch > 0x10ffff) + { + /* ch is not a legal Unicode character. We're fine + with that in UCS-4, though not in UTF-32. */ + if (UNICODE_UCS_4 == type && ch < 0x80000000) + { + decode_unicode_char (ch, dst, data, ignore_bom); + } + else if (little_endian) + { + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, + ignore_bom); + } + else + { + DECODE_ERROR_OCTET ((ch >> 24) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); + } + } + else + { + decode_unicode_char (ch, dst, data, ignore_bom); + } ch = 0; counter = 0; - if (tempch < 0) - { - /* !!#### indicate an error */ - tempch = '~'; - } - decode_unicode_char (tempch, dst, data, ignore_bom); } break; @@ -2032,10 +2196,67 @@ } } - if (str->eof) - DECODE_OUTPUT_PARTIAL_CHAR (ch, dst); + + if (str->eof && ch) + { + switch (type) + { + case UNICODE_UTF_8: + indicate_invalid_utf_8(indicated_length, + counter, ch, dst, data, + ignore_bom); + break; + + case UNICODE_UTF_16: + case UNICODE_UCS_4: + case UNICODE_UTF_32: + if (8 == counter) + { + DECODE_ERROR_OCTET (ch, dst, data, ignore_bom); + } + else if (16 == counter) + { + if (little_endian) + { + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + } + else + { + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, ignore_bom); + } + } + else if (24 == counter) + { + if (little_endian) + { + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + } + else + { + DECODE_ERROR_OCTET ((ch >> 16) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET ((ch >> 8) & 0xFF, dst, data, + ignore_bom); + DECODE_ERROR_OCTET (ch & 0xFF, dst, data, + ignore_bom); + } + } + else assert(0); + break; + } + ch = 0; + } data->counter = counter; + data->indicated_length = indicated_length; } else { @@ -2054,7 +2275,7 @@ if (XCODING_SYSTEM_UNICODE_NEED_BOM (str->codesys) && !data->wrote_bom) { - encode_unicode_char_1 (0xFEFF, dst, type, little_endian); + encode_unicode_char_1 (0xFEFF, dst, type, little_endian, 1); data->wrote_bom = 1; } @@ -2068,7 +2289,7 @@ { /* Processing ASCII character */ ch = 0; encode_unicode_char (Vcharset_ascii, c, 0, dst, type, - little_endian); + little_endian, 1); char_boundary = 1; } @@ -2092,20 +2313,20 @@ for the rationale behind subtracting #xa0 from the character's code. */ encode_unicode_char (Vcharset_control_1, c - 0xa0, 0, dst, - type, little_endian); + type, little_endian, 1); else { switch (XCHARSET_REP_BYTES (charset)) { case 2: encode_unicode_char (charset, c, 0, dst, type, - little_endian); + little_endian, 1); break; case 3: if (XCHARSET_PRIVATE_P (charset)) { encode_unicode_char (charset, c, 0, dst, type, - little_endian); + little_endian, 1); ch = 0; } else if (ch) @@ -2119,7 +2340,7 @@ handle this yet. */ encode_unicode_char (Vcharset_ascii, '~', 0, dst, type, - little_endian); + little_endian, 1); } else { @@ -2138,7 +2359,7 @@ else #endif /* ENABLE_COMPOSITE_CHARS */ encode_unicode_char (charset, ch, c, dst, type, - little_endian); + little_endian, 1); ch = 0; } else @@ -2151,7 +2372,7 @@ if (ch) { encode_unicode_char (charset, ch, c, dst, type, - little_endian); + little_endian, 1); ch = 0; } else @@ -2521,6 +2742,8 @@ type = UNICODE_UTF_7; else if (EQ (value, Qucs_4)) type = UNICODE_UCS_4; + else if (EQ (value, Qutf_32)) + type = UNICODE_UTF_32; else invalid_constant ("Invalid Unicode type", key); @@ -2546,6 +2769,7 @@ case UNICODE_UTF_8: return Qutf_8; case UNICODE_UTF_7: return Qutf_7; case UNICODE_UCS_4: return Qucs_4; + case UNICODE_UTF_32: return Qutf_32; default: ABORT (); } } @@ -2620,6 +2844,7 @@ DEFSYMBOL (Qunicode); DEFSYMBOL (Qucs_4); DEFSYMBOL (Qutf_16); + DEFSYMBOL (Qutf_32); DEFSYMBOL (Qutf_8); DEFSYMBOL (Qutf_7); @@ -2674,6 +2899,14 @@ Fprovide (intern ("unicode")); #ifdef MULE + staticpro (&Vnumber_of_jit_charsets); + Vnumber_of_jit_charsets = make_int (0); + staticpro (&Vlast_jit_charset_final); + Vlast_jit_charset_final = make_char (0x30); + staticpro (&Vcharset_descr); + Vcharset_descr + = build_string ("Mule charset for otherwise unknown Unicode code points."); + staticpro (&Vlanguage_unicode_precedence_list); Vlanguage_unicode_precedence_list = Qnil; diff -r 71bf2c5667ba -r 66411359ce4e src/vdb.c --- a/src/vdb.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/vdb.c Sat Oct 25 21:40:46 2008 +0900 @@ -90,9 +90,8 @@ protection of PROT_READ|PROT_WRITE. */ p = (Rawbyte *) mc_alloc (mc_get_page_size()); set_lheader_implementation ((struct lrecord_header *) p, &lrecord_cons); - fprintf (stderr, "Allocate p: [%x ... %x], length %d\n", - (int) p, (int) (p + mc_get_page_size ()), - (int) mc_get_page_size ()); + fprintf (stderr, "Allocate p: [%p ... %p], length %d\n", + p, p + mc_get_page_size (), (int) mc_get_page_size ()); /* Test read. */ fprintf (stderr, "Attempt to read p[666]... "); @@ -126,13 +125,12 @@ vdb_unprotect (p, mc_get_page_size ()); for (count = Dynarr_length (page_fault_table); count; count--) if (Dynarr_at (page_fault_table, count - 1) == &p[666]) - fprintf (stderr, "VALID page fault at %x\n", - (int) Dynarr_at (page_fault_table, count - 1)); + fprintf (stderr, "VALID page fault at %p\n", + Dynarr_at (page_fault_table, count - 1)); else - fprintf (stderr, "WRONG page fault at %x\n", - (int) Dynarr_at (page_fault_table, count - 1)); + fprintf (stderr, "WRONG page fault at %p\n", + Dynarr_at (page_fault_table, count - 1)); Dynarr_free (page_fault_table); - mc_free (p); return Qnil; } diff -r 71bf2c5667ba -r 66411359ce4e src/window.c --- a/src/window.c Sat Oct 25 20:35:36 2008 +0900 +++ b/src/window.c Sat Oct 25 21:40:46 2008 +0900 @@ -3520,8 +3520,6 @@ int line_size; int defheight, defwidth; - /* #### This is very likely incorrect and instead the char_to_pixel_ - functions should be called. */ default_face_height_and_width (window, &defheight, &defwidth); line_size = (set_height ? defheight : defwidth); @@ -3532,7 +3530,7 @@ if (!nodelete && !TOP_LEVEL_WINDOW_P (w) - && new_pixsize < minsize) + && (new_pixsize + window_modeline_height (w)) < minsize) { Fdelete_window (window, Qnil); return; @@ -3603,7 +3601,17 @@ /* All but the last window should have a height which is a multiple of the default line height. */ if (!NILP (c->next)) - pos = (pos / line_size) * line_size; + { + /* + * Round up when we're shrinking, down when we're growing + * to make sure that pairs of grow / shrink meant to + * cancel out actually do cancel out. + */ + if (pixel_adj_left < 0) + pos = ((pos + line_size -1) / line_size) * line_size; + else + pos = (pos / line_size) * line_size; + } /* Avoid confusion: don't delete child if it becomes too small */ set_window_pixsize (child, pos + first - last_pos, 1, set_height); @@ -4369,8 +4377,6 @@ if (EQ (window, FRAME_ROOT_WINDOW (f))) invalid_operation ("Won't change only window", Qunbound); - /* #### This is very likely incorrect and instead the char_to_pixel_ - functions should be called. */ default_face_height_and_width (window, &defheight, &defwidth); while (1) diff -r 71bf2c5667ba -r 66411359ce4e src/xemacs.def.in.in --- a/src/xemacs.def.in.in Sat Oct 25 20:35:36 2008 +0900 +++ b/src/xemacs.def.in.in Sat Oct 25 21:40:46 2008 +0900 @@ -1,4 +1,23 @@ -/* Put the usual header here */ +/* The module API: core symbols that are visible to modules. + Copyright (C) 2008 Jerry James + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +XEmacs is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ + /* The symbol to import/export is on the left. If the symbol is not meant to be used directly, but a macro or inline function in the API expands to a form containing the symbol, then the macro or diff -r 71bf2c5667ba -r 66411359ce4e tests/ChangeLog --- a/tests/ChangeLog Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/ChangeLog Sat Oct 25 21:40:46 2008 +0900 @@ -1,3 +1,220 @@ +2008-08-27 Aidan Kehoe + + * automated/regexp-tests.el: + Add a few basic #'skip-chars-forward, #'skip-chars-backward + tests. + +2008-08-10 Aidan Kehoe + + * automated/mule-tests.el (featurep): Update the list of character + sets in etc/HELLO to reflect that we've deleted the + XEmacs-specific Arabic character sets. + +2008-05-21 Aidan Kehoe + + * automated/mule-tests.el (featurep): + Make sure that working symlinks are available before testing + their functionality. + Also, don't bomb out on deleting the other temporary files if + deleting the first threw an error. + +2008-02-14 Aidan Kehoe + + * automated/case-tests.el (let): + Correct and extend the previous test, thank you Stephen. + +2008-02-11 Aidan Kehoe + + * automated/case-tests.el (Assert): + New test case; thank you Michael Sperber. + +2008-01-30 Aidan Kehoe + + * automated/case-tests.el (pristine-case-table): + New var, reflecting the standard case table before case-table.el + messes with it. + * automated/case-tests.el: + Call Skip-Test-Unless correctly, following Vin's report of + 20a807210801300635v7533d26rdb32a8d82fb4239b@mail.gmail.com . + Use pristine-case-table, add in a couple more tests. + * automated/test-harness.el (test-harness-from-buffer): + Update the error message in the light of tests skipped for other + reasons (not to do with absent packages). In this case, because + we're exposing diagnostics in a DEBUG_XEMACS build that are no + appropriate to expose to non-DEBUG_XEMACS builds. + +2008-01-30 Aidan Kehoe + + * automated/case-tests.el: + Check for a bug Mike Sperber reported; check algorithms used, if + available. + +2008-01-16 Aidan Kehoe + + * automated/mule-tests.el (test-file-name): + Call #'make-temp-file now it's available. Remove a long comment + saying, essentially, that it should be used, not + #'make-temp-name. + +2008-01-16 Aidan Kehoe + + * automated/hash-table-tests.el: + Assert that two short lists with the same contents in distinct + orders hash differently. + +2008-01-15 Aidan Kehoe + + * automated/lisp-tests.el (literal-with-uninterned): + Use ?\x syntax for Latin-1 characters, don't assume that the file + will be read as UTF-8. + +2008-01-15 Aidan Kehoe + + * automated/lisp-tests.el (thing): + Check that printing a hash table literal doesn't clear + print-gensym-alist. + +2008-01-03 Stephen J. Turnbull + + * automated/symbol-tests.el (Symbol documentation): Add tests to + check documentation extraction. + +2007-12-29 Stephen J. Turnbull + + * automated/test-harness.el (test-harness-test-compiled): + Improve docstring. + + * automated/weak-tests.el (test-harness-test-compiled): + Remove debugging code. + +2007-12-21 Stephen J. Turnbull + + * reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do. + +2007-12-21 Stephen J. Turnbull + + * reproduce-bugs.el: Reorganize. Minor cosmetic improvements. + Update to-do list. + (defbug): Include status and docstring in value. + (bug-hashtable): Document the table format. + (reproduce-bug): Handle revised table format. Remove broken + autoload cookie. + (describe-bug): New function. Pop up description of one bug. + (list-bugs): New function. Pop up brief descriptions of all bugs. + (1,2,3,4,5,6,7,8,9,10,11): (Re)number all bugs. Move comments to + docstrings. + +2007-12-11 Aidan Kehoe + + * automated/syntax-tests.el: + Check that substitute-in-file-name doesn't error when handed + non-existing environment variables, passing through the specified + string instead. Also check that existing environment variables are + correctly substituted. Also check that double slashes in the + middle of a path name are treated as re-starting the path. + +2007-12-10 Stephen J. Turnbull + + * reproduce-bugs.el (reproduce-bug): Add bug 10, crash in search. + +2007-12-10 Stephen J. Turnbull + + * reproduce-bugs.el: Add some commentary. + Number the two unnumbered bugs. + Comment out the keybinding. + +2007-12-06 Aidan Kehoe + + * automated/mule-tests.el: + Add a Known-Bug-Expect-Error call testing and documenting that we + don't support all of the Unicode code space in a single session. + * automated/test-harness.el (Known-Bug-Expect-Error): + Provide Known-Bug-Expect-Error, analagous to + Known-Bug-Expect-Failure and Check-Error. + * automated/test-harness.el (Silence-Message): + Dynamically bind the function definition of #'clear-message, as + well as that of #'append-message, to nil. + +2007-12-04 Aidan Kehoe + + * automated/mule-tests.el (featurep): + The native coding system specified in the language environment can + be either a list (which we used to handle fine) or a single coding + system expression (which we failed on). Handle the latter case. + +2007-11-29 Aidan Kehoe + + * automated/mule-tests.el: + Check the eight-bit fixed-width CCL coding systems for round-trip + compatibility with themselves. + +2007-11-26 Aidan Kehoe + + * automated/lisp-tests.el: + Check that a couple of previously problematic calls to #'format + succeed. + +2007-09-30 Stephen J. Turnbull + + * automated/os-tests.el: Suppress `executable-find' lossage. + + * automated/regexp-tests.el (replace-regexp-in-string): + New tests for error conditions. + + * automated/test-harness.el (test-harness-from-buffer): Comment + about inability to check the FROB in invalid_argument. + +2007-09-23 Stephen J. Turnbull + + * automated/regexp-tests.el (replace-regexp-in-string): + New tests for correct operation. Comment need for `replace-match' + tests. + +2007-08-21 Aidan Kehoe + + * automated/mule-tests.el (test-chars): + There are now 2^21 possible characters under Mule, not 2^19. + * automated/mule-tests.el (test-file-name): + Call #'make-temp-name instead of writing the file needed for the + rever-buffer test to the user's home directory. Wrap the following + #'save-buffer in a Silence-Message call. + * automated/mule-tests.el: + In the language environment tests, check that a given input method + exists before trying to activate it. If there are installed input + methods, assert that every input method specified in any language + environment exists. If the native-coding-system of the language + environment is specified as a function, don't assert that it is a + coding system. + + In the byte-compiler coding cookie tests, call #'read at runtime + on strings with non-Latin-1 Unicode escapes. This avoids errors + when make check is run under a non-Mule XEmacs, where unavailable + Unicode escapes throw an error in the Lisp reader. + + Add a new Known-Bug-Expect-Failure call for a bug that occurred to + me yesterday; if non-Latin-1 is generated in an eval-when-compile + clause, that non-ASCII may be trashed and the compiled code + incorrectly saved as no-conversion if no other non-Latin-1 exists + in the input buffer. Add a comment giving more details of the bug + and how one might fix it. + +2007-06-22 Stephen J. Turnbull + + * automated/mule-tests.el (buffer-modified-p): Test after revert. + +2007-06-21 Aidan Kehoe + + * gtk/event-stream-tests.el (timer-check): + '(lambda ...) -> #'(lambda ..), for the sake of style and the byte + compiler. + +2007-06-21 Aidan Kehoe + + * automated/weak-tests.el (p): + * automated/weak-tests.el (inner_cons): + '(lambda ...) -> #'(lambda ..), for the sake of style and the byte + compiler. + 2007-05-21 Stephen J. Turnbull * XEmacs 21.5.28 "fuki" is released. diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/case-tests.el --- a/tests/automated/case-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/case-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -30,6 +30,16 @@ ;; Test case-table related functionality. +(defvar pristine-case-table nil + "The standard case table, without manipulation from case-tests.el") + +(setq pristine-case-table (or + ;; This is the compiled run; we've retained + ;; it from the interpreted run. + pristine-case-table + ;; This is the interpreted run; set it. + (copy-case-table (standard-case-table)))) + (Assert (case-table-p (standard-case-table))) ;; Old case table test. (Assert (case-table-p (list @@ -268,3 +278,56 @@ (goto-char (point-max)) (Assert (not (search-backward string nil t 6)))))) +;; Bug reported in http://mid.gmane.org/y9lk5lu5orq.fsf@deinprogramm.de from +;; Michael Sperber. Fixed 2008-01-29. +(with-string-as-buffer-contents "\n\nDer beruhmte deutsche Flei\xdf\n\n" + (goto-char (point-min)) + (Assert (search-forward "Flei\xdf"))) + +(with-temp-buffer + (let ((target "M\xe9zard") + (debug-xemacs-searches 1)) + (Assert (not (search-forward target nil t))) + (insert target) + (goto-char (point-min)) + ;; #### search-algorithm-used is simple-search after the following, + ;; which shouldn't be necessary; it should be possible to use + ;; Boyer-Moore. + ;; + ;; But searches for ASCII strings in buffers with nothing above ?\xFF + ;; use Boyer Moore with the current implementation, which is the + ;; important thing for the Gnus use case. + (Assert (= (1+ (length target)) (search-forward target nil t))))) + +(Skip-Test-Unless + (boundp 'debug-xemacs-searches) ; normal when we have DEBUG_XEMACS + "not a DEBUG_XEMACS build" + "checks that the algorithm chosen by #'search-forward is relatively sane" + (let ((debug-xemacs-searches 1)) + (with-temp-buffer + (set-case-table pristine-case-table) + (insert "\n\nDer beruhmte deutsche Fleiss\n\n") + (goto-char (point-min)) + (Assert (search-forward "Fleiss")) + (delete-region (point-min) (point-max)) + (insert "\n\nDer beruhmte deutsche Flei\xdf\n\n") + (goto-char (point-min)) + (Assert (search-forward "Flei\xdf")) + (Assert (eq 'boyer-moore search-algorithm-used)) + (delete-region (point-min) (point-max)) + (when (featurep 'mule) + (insert "\n\nDer beruhmte deutsche Flei\xdf\n\n") + (goto-char (point-min)) + (Assert + (search-forward (format "Fle%c\xdf" + (make-char 'latin-iso8859-9 #xfd)))) + (Assert (eq 'boyer-moore search-algorithm-used)) + (insert (make-char 'latin-iso8859-9 #xfd)) + (goto-char (point-min)) + (Assert (search-forward "Flei\xdf")) + (Assert (eq 'simple-search search-algorithm-used)) + (goto-char (point-min)) + (Assert (search-forward (format "Fle%c\xdf" + (make-char 'latin-iso8859-9 #xfd)))) + (Assert (eq 'simple-search search-algorithm-used)))))) + diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/hash-table-tests.el --- a/tests/automated/hash-table-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/hash-table-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -281,3 +281,4 @@ ;;; Test sxhash (Assert (= (sxhash "foo") (sxhash "foo"))) (Assert (= (sxhash '(1 2 3)) (sxhash '(1 2 3)))) +(Assert (/= (sxhash '(1 2 3)) (sxhash '(3 2 1)))) diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/lisp-tests.el --- a/tests/automated/lisp-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/lisp-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -1279,6 +1279,10 @@ (Assert (= (read (format "%d" most-negative-fixnum)) most-negative-fixnum)) (Assert (= (read (format "%ld" most-negative-fixnum)) most-negative-fixnum)) +;; These used to crash. +(Assert (eql (read (format "%f" 1.2e+302)) 1.2e+302)) +(Assert (eql (read (format "%.1000d" 1)) 1)) + ;;; "%u" is undocumented, and Emacs Lisp has no unsigned type. ;;; What to do if "%u" is used with a negative number? ;;; For non-bignum XEmacsen, the most reasonable thing seems to be to print an @@ -1295,3 +1299,17 @@ ;; Check all-completions ignore element start with space. (Assert (not (all-completions "" '((" hidden" . "object"))))) (Assert (all-completions " " '((" hidden" . "object")))) + +(let* ((literal-with-uninterned + '(first-element + [#1=#:G32976 #2=#:G32974 #3=#:G32971 #4=#:G32969 alias + #s(hash-table size 256 data (969 ?\xF9 55 ?7 166 ?\xA6)) + #5=#:G32970 #6=#:G32972])) + (print-readably t) + (print-gensym t) + (printed-with-uninterned (prin1-to-string literal-with-uninterned)) + (awkward-regexp "#1=#") + (first-match-start (string-match awkward-regexp + printed-with-uninterned))) + (Assert (null (string-match awkward-regexp printed-with-uninterned + (1+ first-match-start))))) diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/mule-tests.el --- a/tests/automated/mule-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/mule-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -42,12 +42,12 @@ (defun test-chars (&optional for-test-harness) "Insert all characters in a buffer, to see if XEmacs will crash. This is done by creating a string with all the legal characters -in [0, 2^19) range, inserting it into the buffer, and checking +in [0, 2^21) range, inserting it into the buffer, and checking that the buffer's contents are equivalent to the string. If FOR-TEST-HARNESS is specified, a temporary buffer is used, and the Assert macro checks for correctness." - (let ((max (expt 2 (if (featurep 'mule) 19 8))) + (let ((max (expt 2 (if (featurep 'mule) 21 8))) (list nil) (i 0)) (while (< i max) @@ -112,6 +112,35 @@ ;; ochars[3] = 0x80 | input & ~(0xFFFFFFC0); (logior #x80 (logand code-point #x3f)))))))) +;;---------------------------------------------------------------- +;; Test that revert-buffer resets the modiff +;; Bug reported 2007-06-20 <200706201902.32191.scop@xemacs.org>. +;; Fixed 2007-06-22 <18043.2793.611745.734215@parhasard.net>. +;;---------------------------------------------------------------- + +(let ((test-file-name + (make-temp-file (expand-file-name "tXfXsKc" (temp-directory)))) + revert-buffer-function + kill-buffer-hook) ; paranoia + (find-file test-file-name) + (erase-buffer) + (insert "a string\n") + (Silence-Message (save-buffer 0)) + (insert "more text\n") + (revert-buffer t t) + ;; Just "find-file" with autodetect coding didn't fail for me, but it does + ;; fail under test harness. Still we'll redo the test with an explicit + ;; coding system just in case. + (Assert (not (buffer-modified-p))) + (kill-buffer nil) + (when (find-coding-system 'utf-8) + (find-file test-file-name 'utf-8) + (insert "more text\n") + (revert-buffer t t) + (Assert (not (buffer-modified-p))) + (kill-buffer nil)) + (delete-file test-file-name)) + ;;----------------------------------------------------------------- ;; Test string modification functions that modify the length of a char. ;;----------------------------------------------------------------- @@ -341,21 +370,34 @@ ;; make-temp-name does stat(), which on OS X requires that you ;; normalise, where open() will normalise for you. Previously we ;; used scaron as the Latin-2 character, and make-temp-name errored - ;; on OS X. LATIN CAPITAL LETTER D WITH STROKE does decompose. + ;; on OS X. LATIN CAPITAL LETTER D WITH STROKE does not decompose. (name1 (make-temp-name prefix)) - (name2 (make-temp-name prefix))) - ;; This is how you suppress output from `message', called by `write-region' + (name2 (make-temp-name prefix)) + (name3 (make-temp-name prefix)) + working-symlinks) (Assert (not (equal name1 name2))) (Assert (not (file-exists-p name1))) + ;; This is how you suppress output from `message', called by `write-region' (Silence-Message (write-region (point-min) (point-max) name1)) (Assert (file-exists-p name1)) - (when (fboundp 'make-symbolic-link) + (Silence-Message + (write-region (point-min) (point-max) name3)) + (Assert (file-exists-p name3)) + (condition-case nil + (make-symbolic-link name1 name3) + (file-already-exists + ;; If we actually have functioning symlinks, we end up here, since + ;; name3 already exists and OK-IF-ALREADY-EXISTS was not specified. + (setq working-symlinks t))) + (when working-symlinks (make-symbolic-link name1 name2) (Assert (file-exists-p name2)) (Assert (equal (file-truename name2) name1)) (Assert (equal (file-truename name1) name1))) - (ignore-file-errors (delete-file name1) (delete-file name2))) + (ignore-file-errors (delete-file name1)) + (ignore-file-errors (delete-file name2)) + (ignore-file-errors (delete-file name3))) ;; Add many more file operation tests here... @@ -453,6 +495,28 @@ (eq (aref ccl-vector 4) (encode-char (make-char 'control-1 31) 'ucs))))) + + ;; Test the 8 bit fixed-width coding systems for round-trip + ;; compatibility with themselves. + (loop + for coding-system in (coding-system-list) + with all-possible-octets = (apply #'string + (loop for i from ?\x00 to ?\xFF + collect i)) + do + (when (and (coding-system-get coding-system '8-bit-fixed) + ;; Don't check the coding systems with autodetect, they are + ;; not round-trip compatible for the possible line-ending + ;; characters. + (string-match #r"-\(unix\|dos\|mac\)$" + (symbol-name coding-system))) + ;; These coding systems are round-trip compatible with themselves. + (Assert (equal (encode-coding-string + (decode-coding-string all-possible-octets + coding-system) + coding-system) + all-possible-octets)))) + ;;--------------------------------------------------------------- ;; Test charset-in-* functions ;;--------------------------------------------------------------- @@ -462,35 +526,68 @@ ;; The sort is to make the algorithm of charsets-in-region ;; irrelevant. (sort (charsets-in-region (point-min) (point-max)) - 'string<) - '(arabic-1-column arabic-2-column ascii chinese-big5-1 - chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 - hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 - katakana-jisx0201 korean-ksc5601 latin-iso8859-1 - latin-iso8859-2 thai-xtis vietnamese-viscii-lower))) + #'string<) + '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5 + ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208 + japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201 + korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis + vietnamese-viscii-lower))) (Assert (equal (sort (charsets-in-string (buffer-substring (point-min) (point-max))) - 'string<) - '(arabic-1-column arabic-2-column ascii chinese-big5-1 - chinese-gb2312 cyrillic-iso8859-5 ethiopic greek-iso8859-7 - hebrew-iso8859-8 japanese-jisx0208 japanese-jisx0212 - katakana-jisx0201 korean-ksc5601 latin-iso8859-1 - latin-iso8859-2 thai-xtis vietnamese-viscii-lower)))) + #'string<) + '(ascii chinese-big5-1 chinese-gb2312 cyrillic-iso8859-5 + ethiopic greek-iso8859-7 hebrew-iso8859-8 japanese-jisx0208 + japanese-jisx0212 jit-ucs-charset-0 katakana-jisx0201 + korean-ksc5601 latin-iso8859-1 latin-iso8859-2 thai-xtis + vietnamese-viscii-lower)))) + + ;;--------------------------------------------------------------- + ;; Language environments, and whether the specified values are sane. + ;;--------------------------------------------------------------- + (loop + for language in (mapcar #'car language-info-alist) + with language-input-method = nil + with native-coding-system = nil + do + ;; s-l-e can call #'require, which says "Loading ..." + (Silence-Message (set-language-environment language)) + (Assert (equal language current-language-environment)) - ;; Language environments. - (dolist (language (mapcar 'car language-info-alist)) - (set-language-environment language) - (Assert (equal language current-language-environment)) - (set-input-method (get-language-info language 'input-method)) - (Assert (equal (get-language-info language 'input-method) - current-input-method)) + (setq language-input-method + (get-language-info language 'input-method)) + (when (and language-input-method + ;; #### Not robust, if more input methods besides canna are + ;; in core. The intention of this is that if *any* of the + ;; packages' input methods are available, we check that *all* + ;; of the language environments' input methods actually + ;; exist, which goes against the spirit of non-monolithic + ;; packages. But I don't have a better approach to this. + (> (length input-method-alist) 1)) + (Assert (assoc language-input-method input-method-alist)) + (Skip-Test-Unless + (assoc language-input-method input-method-alist) + "input method unavailable" + (format "check that IM %s can be activated" language-input-method) + ;; s-i-m can load files. + (Silence-Message + (set-input-method language-input-method)) + (Assert (equal language-input-method current-input-method)))) + (dolist (charset (get-language-info language 'charset)) (Assert (charsetp (find-charset charset)))) (dolist (coding-system (get-language-info language 'coding-system)) (Assert (coding-system-p (find-coding-system coding-system)))) - (dolist (coding-system (get-language-info language 'coding-system)) - (Assert (coding-system-p (find-coding-system coding-system))))) + (dolist (coding-system + (if (listp (setq native-coding-system + (get-language-info language + 'native-coding-system))) + native-coding-system + (list native-coding-system))) + ;; We don't have the appropriate POSIX locales to test with a + ;; native-coding-system that is a function. + (unless (functionp coding-system) + (Assert (coding-system-p (find-coding-system coding-system)))))) (with-temp-buffer (flet @@ -506,9 +603,9 @@ temporary-file-name (current-buffer) byte-compile-result) - (Assert (string-match "^;;;###coding system: escape-quoted" - (buffer-substring nil nil - byte-compile-result)))))) + (Assert (string-match + "^;;;###coding system: escape-quoted" + (buffer-substring nil nil byte-compile-result)))))) (Assert-elc-has-no-specified-encoding () "Assert the current buffer has no coding cookie if compiled." (save-excursion @@ -523,17 +620,21 @@ byte-compile-result) (Assert (not (string-match ";;;###coding system:" - (buffer-substring nil nil byte-compile-result)))))))) + (buffer-substring nil nil + byte-compile-result)))))))) (insert - ;; Create a buffer creating the Unicode escapes. - #r" (defvar testing-mule-compilation-handling - (string ?\u371E ;; kDefinition beautiful; pretty, used + ;; Create a buffer with Unicode escapes. The #'read call is at + ;; runtime, because this file may be compiled and read in a non-Mule + ;; XEmacs. (But it won't be run.) + (read + "#r\" (defvar testing-mule-compilation-handling + (string ?\\u371E ;; kDefinition beautiful; pretty, used ;; in girl's name - ?\U0002A6A9 ;; kDefinition (Cant.) sound of shouting - ?\U0002A65B ;; kDefinition (Cant.) decayed teeth; + ?\\U0002A6A9 ;; kDefinition (Cant.) sound of shouting + ?\\U0002A65B ;; kDefinition (Cant.) decayed teeth; ;; tongue-tied - ?\U00010400 ;; DESERET CAPITAL LETTER LONG I - ?\u3263)) ;; CIRCLED HANGUL RIEUL ") + ?\\U00010400 ;; DESERET CAPITAL LETTER LONG I + ?\\u3263)) ;; CIRCLED HANGUL RIEUL \"")) (Assert-elc-is-escape-quoted) (delete-region (point-min) (point-max)) @@ -541,55 +642,96 @@ (insert ;; This time, the buffer will contain the actual characters, because of ;; u flag to the #r. - #ru" (defvar testing-mule-compilation-handling - (string ?\u371E ;; kDefinition beautiful; pretty, used + (read + "#ru\" (defvar testing-mule-compilation-handling + (string ?\\u371E ;; kDefinition beautiful; pretty, used ;; in girl's name - ?\U0002A6A9 ;; kDefinition (Cant.) sound of shouting - ?\U0002A65B ;; kDefinition (Cant.) decayed teeth; + ?\\U0002A6A9 ;; kDefinition (Cant.) sound of shouting + ?\\U0002A65B ;; kDefinition (Cant.) decayed teeth; ;; tongue-tied - ?\U00010400 ;; DESERET CAPITAL LETTER LONG I - ?\u3263)) ;; CIRCLED HANGUL RIEUL ") + ?\\U00010400 ;; DESERET CAPITAL LETTER LONG I + ?\\u3263)) ;; CIRCLED HANGUL RIEUL \"")) (Assert-elc-is-escape-quoted) (delete-region (point-min) (point-max)) (insert ;; Just a single four character escape. - #r" (defvar testing-mule-compilation-handling - (string ?\u371E)) ;; kDefinition beautiful; pretty, used") + (read + "#r\" (defvar testing-mule-compilation-handling + (string ?\\u371E)) ;; kDefinition beautiful; pretty, used\"")) (Assert-elc-is-escape-quoted) (delete-region (point-min) (point-max)) (insert ;; Just a single eight character escape. - #r" (defvar testing-mule-compilation-handling - (string ?\U0002A65B)) ;; kDefinition (Cant.) decayed teeth;") + (read + "#r\" (defvar testing-mule-compilation-handling + (string ?\\U0002A65B)) ;; kDefinition (Cant.) decayed teeth;\"")) (Assert-elc-is-escape-quoted) (delete-region (point-min) (point-max)) (insert - ;; A single latin-1 hex digit escape + ;; A single latin-1 hex digit escape No run-time #'read call, + ;; non-Mule can handle this too. #r" (defvar testing-mule-compilation-handling - (string ?\xab)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK") + (string ?\xab)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK") + + (Assert-elc-has-no-specified-encoding) + (delete-region (point-min) (point-max)) + + (insert + ;; A single latin-1 character. No run-time #'read call. + #ru" (defvar testing-mule-compilation-handling + (string ?\u00AB)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK\")") (Assert-elc-has-no-specified-encoding) (delete-region (point-min) (point-max)) (insert - ;; A single latin-1 character - #ru" (defvar testing-mule-compilation-handling - (string ?\u00AB)) ;; LEFT-POINTING DOUBLE ANGLE QUOTATION MARK") + ;; Just ASCII. No run-time #'read call + #r" (defvar testing-mule-compilation-handling + (string ?A)) ;; LATIN CAPITAL LETTER A") (Assert-elc-has-no-specified-encoding) (delete-region (point-min) (point-max)) + ;; This bug exists because the coding-cookie insertion code looks at + ;; the input buffer, not the output buffer. + ;; + ;; It looks at the input buffer because byte-compile-dynamic and + ;; byte-compile-dynamic-docstrings currently need to be + ;; unconditionally turned off for Mule files, since dynamic + ;; compilation of function bodies and docstrings fails if you can't + ;; call (point) and trivially get the byte offset in the file. + ;; + ;; And to unconditionally turn those two features off, you need to + ;; know before byte-compilation whether the byte-compilation output + ;; file contains non-Latin-1 characters, or perhaps to check after + ;; compilation and redo; but we don't do the latter. + ;; + ;; To fix this bug, we need to add Mule support to + ;; byte-compile-dynamic and byte-compile-dynamic-docstrings. Or drop + ;; support for those features entirely. (insert - ;; Just ASCII. - #r" (defvar testing-mule-compilation-handling - (string ?A)) ;; LATIN CAPITAL LETTER A") - - (Assert-elc-has-no-specified-encoding) + "(defvar testing-mule-compilation-handling (eval-when-compile + (decode-char 'ucs #x371e))) ;; kDefinition beautiful; pretty, used\"") + (Known-Bug-Expect-Failure + (Assert-elc-is-escape-quoted)) (delete-region (point-min) (point-max)))) + + (Known-Bug-Expect-Error + invalid-constant + (loop + for i from #x0 to #x10FFFF + with exceptions = #s(range-table type start-closed-end-closed + data ((#xFFFE #xFFFF) t + (#xFDD0 #xFDEF) t + (#xD800 #xDBFF) t + (#xDC00 #xDFFF) t)) + do (unless (get-range-table i exceptions) + (read (format (if (> i #xFFFF) #r"?\U%08X" #r"?\u%04X") i))) + finally return t)) ) diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/os-tests.el --- a/tests/automated/os-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/os-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -36,15 +36,18 @@ ;; in . ;; tac works by lines, unfortunately +;; #### The contortions around `executable-find' gag me, but I don't have time +;; to deal today. If we have `executable-find', we should use its value! (let* ((original-string "a\nb\nc\nd\n") - (tac-cases (if (executable-find "tac") + ;; `executable-find' is in a package and may be unavailable. + (tac-cases (if (and (fboundp 'executable-find) (executable-find "tac")) '((1 . "c\nb\na\nd\n") (3 . "a\nc\nb\nd\n") (5 . "a\nc\nb\nd\n") (7 . "a\nc\nb\nd\n") (9 . "a\nd\nc\nb\n")) nil)) - (cat-cases (if (executable-find "cat") + (cat-cases (if (and (fboundp 'executable-find) (executable-find "cat")) '((1 . "b\nc\na\nd\n") (3 . "a\nb\nc\nd\n") (5 . "a\nb\nc\nd\n") diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/regexp-tests.el --- a/tests/automated/regexp-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/regexp-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -459,3 +459,88 @@ (Assert (null (match-string 2 text2))) ) +;; replace-regexp-in-string (regexp rep source +;; fixedcase literal buf-or-subexp start) + +;; Currently we test the following cases: +;; where `cbuf' and `bar-or-empty' are bound below. + +;; #### Tests for the various functional features (fixedcase, literal, start) +;; should be added. + +(with-temp-buffer + (flet ((bar-or-empty (subexp) (if (string= subexp "foo") "bar" ""))) + (let ((cbuf (current-buffer))) + (dolist (test-case + ;; REP BUF-OR-SUBEXP EXPECTED RESULT + `(("bar" nil " bar") + ("bar" ,cbuf " bar") + ("bar" 0 " bar") + ("bar" 1 " bar foo") + (bar-or-empty nil " ") + (bar-or-empty ,cbuf " ") + (bar-or-empty 0 " ") + (bar-or-empty 1 " bar foo"))) + (Assert + (string= + (nth 2 test-case) + (replace-regexp-in-string "\\(foo\\).*\\'" (nth 0 test-case) + " foo foo" nil nil (nth 1 test-case))))) + ;; #### Why doesn't this loop work right? +; (dolist (test-case +; ;; REP BUF-OR-SUBEXP EXPECTED ERROR EXPECTED MESSAGE +; `(;; expected message was "bufferp, symbol" up to 21.5.28 +; ("bar" 'symbol wrong-type-argument "integerp, symbol") +; ("bar" -1 invalid-argument +; "match data register invalid, -1") +; ("bar" 2 invalid-argument +; "match data register not set, 2") +; )) +; (eval +; `(Check-Error-Message ,(nth 2 test-case) ,(nth 3 test-case) +; (replace-regexp-in-string "\\(foo\\).*\\'" ,(nth 0 test-case) +; " foo foo" nil nil ,(nth 1 test-case))))) + ;; #### Can't test the message with w-t-a, see test-harness.el. + (Check-Error wrong-type-argument + (replace-regexp-in-string "\\(foo\\).*\\'" + "bar" + " foo foo" nil nil + 'symbol)) + ;; #### Can't test the FROB (-1), see test-harness.el. + (Check-Error-Message invalid-argument + "match data register invalid" + (replace-regexp-in-string "\\(foo\\).*\\'" + "bar" + " foo foo" nil nil + -1)) + ;; #### Can't test the FROB (-1), see test-harness.el. + (Check-Error-Message invalid-argument + "match data register not set" + (replace-regexp-in-string "\\(foo\\).*\\'" + "bar" + " foo foo" nil nil + 2)) + ))) + +;; Not very comprehensive tests of skip-chars-forward, skip-chars-background: + +(with-string-as-buffer-contents + "-]-----------------------------][]]------------------------" + (skip-chars-forward (skip-chars-quote "-[]")) + (Assert (= (point) (point-max))) + (skip-chars-backward (skip-chars-quote "-[]")) + (Assert (= (point) (point-min))) + ;; Testing in passing for an old bug in #'skip-chars-forward where I + ;; thought it was impossible to call it with a string containing only ?- + ;; and ?]: + (Assert (= (skip-chars-forward (skip-chars-quote "-]")) + (position ?[ (buffer-string) :test #'=))) + ;; This used to error, incorrectly: + (Assert (skip-chars-quote "[-"))) + +;; replace-match (REPLACEMENT &optional FIXEDCASE LITERAL STRING STRBUFFER) + +;; #### Write some tests! Much functionality is implicitly tested above +;; via `replace-regexp-in-string', but we should specifically test bogus +;; combinations of STRING and STRBUFFER. + diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/symbol-tests.el --- a/tests/automated/symbol-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/symbol-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -332,3 +332,23 @@ ; (Assert (equal (catch 'test-tag ; (set mysym 'foo)) ; `(,mysym (foo) make-local nil nil)))) + +;; ---------------------------------------------------------------- +;; Symbol documentation +;; ---------------------------------------------------------------- + +;; built-in variable documentation +(Assert (string= (built-in-symbol-file 'internal-doc-file-name) + "doc.c")) + +;; built-in function documentation +(Assert (string= (built-in-symbol-file 'built-in-symbol-file) + "doc.c")) + +;; built-in macro documentation +(Assert (string= (built-in-symbol-file 'when) + "eval.c")) + +;; #### we should handle symbols defined in Lisp, dumped, autoloaded, +;; and required, too. + diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/syntax-tests.el --- a/tests/automated/syntax-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/syntax-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -205,3 +205,37 @@ ;; special-case check that point didn't move (Assert (= (point) 25)))) +(loop + with envvar-not-existing = (symbol-name (gensym "whatever")) + with envvar-existing = (symbol-name (gensym "whatever")) + with envvar-existing-val = (make-string #x10000 ?\xe1) + with examples = + (list (list (format "%chome%cwhatever%c%chi-there%c$%s" + directory-sep-char + directory-sep-char + directory-sep-char + directory-sep-char + directory-sep-char + envvar-existing) + (format "%chi-there%c%s" + directory-sep-char + directory-sep-char + envvar-existing-val)) + (if (memq system-type '(windows-nt cygwin32)) + '("//network-path/c$" "//network-path/c$") + '("/network-path/c$" "/network-path/c$")) + (list (format "/home/whoever/$%s" envvar-not-existing) + (format "/home/whoever/$%s" envvar-not-existing)) + (list (format "/home/whoever/$%s" envvar-existing) + (format "/home/whoever/%s" envvar-existing-val)) + (list (format "/home/whoever/${%s}" envvar-existing) + (format "/home/whoever/%s" envvar-existing-val)) + (list (format "/home/whoever/${%s}" envvar-not-existing) + (format "/home/whoever/${%s}" envvar-not-existing))) + initially (progn (setenv envvar-not-existing nil t) + (setenv envvar-existing envvar-existing-val)) + for (pre post) + in examples + do + (Assert (string= post (substitute-in-file-name pre)))) + diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/test-harness.el --- a/tests/automated/test-harness.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/test-harness.el Sat Oct 25 21:40:46 2008 +0900 @@ -71,7 +71,17 @@ (defvar unexpected-test-file-failures) (defvar test-harness-test-compiled nil - "Non-nil means the test code was compiled before execution.") + "Non-nil means the test code was compiled before execution. + +You probably should not make tests depend on compilation. +However, it can be useful to conditionally change messages based on whether +the code was compiled or not. For example, the case that motivated the +implementation of this variable: + +\(when test-harness-test-compiled + ;; this ha-a-ack depends on the failing compiled test coming last + \(setq test-harness-failure-tag + \"KNOWN BUG - fix reverted; after 2003-10-31 notify stephen\n\"))") (defvar test-harness-verbose (and (not noninteractive) (> (device-baud-rate) search-slow-speed)) @@ -203,7 +213,29 @@ `(let ((test-harness-failure-tag "KNOWN BUG") (test-harness-success-tag "PASS (FAILURE EXPECTED)")) ,@body)) - + + (defmacro Known-Bug-Expect-Error (expected-error &rest body) + (let ((quoted-body (if (= 1 (length body)) + `(quote ,(car body)) `(quote (progn ,@body))))) + `(let ((test-harness-failure-tag "KNOWN BUG") + (test-harness-success-tag "PASS (FAILURE EXPECTED)")) + (condition-case error-info + (progn + (setq trick-optimizer (progn ,@body)) + (Print-Pass + "%S executed successfully, but expected error %S" + ,quoted-body + ',expected-error) + (incf passes)) + (,expected-error + (Print-Failure "%S ==> error %S, as expected" + ,quoted-body ',expected-error) + (incf no-error-failures)) + (error + (Print-Failure "%S ==> expected error %S, got error %S instead" + ,quoted-body ',expected-error error-info) + (incf wrong-error-failures)))))) + (defmacro Implementation-Incomplete-Expect-Failure (&rest body) `(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE") (test-harness-success-tag "PASS (FAILURE EXPECTED)")) @@ -285,6 +317,10 @@ ,quoted-body ',expected-error) (incf no-error-failures)) (,expected-error + ;; #### Damn, this binding doesn't capture frobs, eg, for + ;; invalid_argument() ... you only get the REASON. And for + ;; wrong_type_argument(), there's no reason only FROBs. + ;; If this gets fixed, fix tests in regexp-tests.el. (let ((error-message (second error-info))) (if (string-match ,expected-error-regexp error-message) (progn @@ -333,7 +369,9 @@ ;; #### Perhaps this should override `message' itself, too? (defmacro Silence-Message (&rest body) - `(flet ((append-message (&rest args) ())) ,@body)) + `(flet ((append-message (&rest args) ()) + (clear-message (&rest args) ())) + ,@body)) (defmacro Ignore-Ebola (&rest body) `(let ((debug-issue-ebola-notices -42)) ,@body)) @@ -406,9 +444,9 @@ skipped-test-reasons) (when (> (length reasons) 1) (setq summary-msg (concat summary-msg reasons " - Probably XEmacs cannot find your installed packages. Set EMACSPACKAGEPATH - to the package hierarchy root or configure with --package-path to enable - the skipped tests."))) + It may be that XEmacs cannot find your installed packages. Set + EMACSPACKAGEPATH to the package hierarchy root or configure with + --package-path to enable the skipped tests."))) (setq test-harness-file-results-alist (cons (list filename passes total) test-harness-file-results-alist)) diff -r 71bf2c5667ba -r 66411359ce4e tests/automated/weak-tests.el --- a/tests/automated/weak-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/automated/weak-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -36,11 +36,6 @@ (push (file-name-directory load-file-name) load-path) (require 'test-harness)))) -(when test-harness-test-compiled - ;; this ha-a-ack depends on the compiled test coming last - (setq test-harness-failure-tag - "KNOWN BUG - fix reverted; after 2003-10-31 bitch at stephen\n")) - (garbage-collect) ;; tests for weak-boxes @@ -55,8 +50,8 @@ (let* ((p (cons 3 4)) (finalized-p nil) (eph1 (make-ephemeron (cons 1 2) p - '(lambda (value) - (setq finalized-p t)))) + #'(lambda (value) + (setq finalized-p t)))) (eph2 (make-ephemeron p p))) (Assert (eq p (ephemeron-ref (make-ephemeron (cons 1 2) p)))) (Assert (ephemeron-p (make-ephemeron (cons 1 2) p))) @@ -233,7 +228,7 @@ (make-ephemeron inner_cons (cons 1 2) '(lambda (v) t)) - '(lambda (v) t)))) + #'(lambda (v) t)))) (Assert (ephemeron-ref (ephemeron-ref weak1))) (garbage-collect) ;; assure the inner ephis are still there diff -r 71bf2c5667ba -r 66411359ce4e tests/gtk/event-stream-tests.el --- a/tests/gtk/event-stream-tests.el Sat Oct 25 20:35:36 2008 +0900 +++ b/tests/gtk/event-stream-tests.el Sat Oct 25 21:40:46 2008 +0900 @@ -29,7 +29,7 @@ ; Make sure that timer handlers are run during, not after sit-for: (defun timer-check () - (add-timeout 2 '(lambda (ignore) (message "timer ran")) nil) + (add-timeout 2 #'(lambda (ignore) (message "timer ran")) nil) (sit-for 5) (message "after sit-for")) diff -r 71bf2c5667ba -r 66411359ce4e tests/reproduce-bugs.el --- a/tests/reproduce-bugs.el Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -;;; reproduce-bugs.el --- reproduce bugs in XEmacs; - -;; Copyright (C) 1997 Free Software Foundation, Inc. -;; Copyright (C) 1997 Sun Microsystems, Inc. - -;; Keywords: bugs, crash, burn, die, croak, munge - -;; This file is part of XEmacs. - -;; This file is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) -;; any later version. - -;; XEmacs is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -;; 02111-1307, USA. - -;;; Synched up with: Not in FSF. - -;;; Commentary: - -;; Reproduce XEmacs bugs, so that they can get fixed. -;; Especially, make XEmacs crash. -;; You may need to use a debug version of XEmacs to reproduce some of these. - -;; Several global keybindings are created, each of which exhibits a bug. - -;; For XEmacs maintainers and other masochists. - -;; It's a bad idea to rely on code in this file continuing to work in -;; the same way. :-) - -;;; Code: - -(defvar bug-hashtable (make-hashtable 10)) - -(defmacro defbug (bug-number &rest body) - `(puthash ,bug-number (lambda () ,@body) bug-hashtable)) - -(put 'defbug 'lisp-indent-function 'defun) - -(defconst bug-buffer - (save-excursion - (set-buffer (get-buffer-create "*Bug*")) - (erase-buffer) - (current-buffer))) - -;;;####autoload -(defun reproduce-bug (number) - "Reproduce XEmacs bugs, so that they can get fixed. -Especially, make XEmacs crash. -See reproduce-bugs.el for bug descriptions and bug numbers. -A debug version of XEmacs may be needed to reproduce some bugs." - (interactive "nBug Number: ") - (funcall (gethash number bug-hashtable))) - -;;; Change this to your preferred key-binding - -(global-set-key [(control ?Z)] 'reproduce-bug) - -;;;; Bugs follow: - -;;; ------------------------------------------------------------------ -;;; Crash on trace-function -;;; Fatal error: assertion failed, file src/eval.c, line 1405, abort() -(defbug 1 - (trace-function 'record-buffer bug-buffer) - (pop-to-buffer bug-buffer)) - - -;;; ------------------------------------------------------------------ -;;; Crashes with stack overflow -;;; Should give error via barf-if-buffer-read-only -;;; Fatal error: assertion failed, file src/eval.c, line 1874, abort() -;; This bug has been fixed. -sb -(defbug 2 - (switch-to-buffer bug-buffer) - ;; The following line should contain a number of eight-bit characters - (insert "²èÌÌËè¤Î°ÜÆ°¤Ï¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£º£Å٤ϡ¢²èÌ̤ÎÃæ¤Ç¡¢ÆÃÄê¤Î¾ì") - (setq buffer-read-only t) - (ignore-errors - (encode-coding-region (point-min) (point-max) 'euc-japan)) - (garbage-collect)) - - -;;; ------------------------------------------------------------------ -;;; Crashes in debug version only -;;; Fatal error: assertion failed, file src/objects.h, line 149, -;;; RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj) -(defbug 3 - (let (glyph ext) - (make-face 'adobe-symbol-face) - (set-face-font - 'adobe-symbol-face - "-adobe-symbol-medium-r-normal--*-140-*-*-p-*-adobe-fontspecific") - (setq glyph (make-glyph (list (vector 'string - :data (char-to-string ?\xD3))))) - (set-glyph-face glyph 'adobe-symbol-face) - (setq ext (make-extent 14 18)) - (set-extent-property ext 'begin-glyph glyph))) - - -;;; ------------------------------------------------------------------ -;;; (maybe?) crash koi8 -;;; ACCL: Invalid command (c) -;;; With debugging on, crashes as follows: -;;; Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj) -(defbug 5 - ;;(load "cyrillic") - ;;(load "cyrillic-hooks") - (princ (decode-coding-string "\xe1" 'koi8))) - - -;;; ------------------------------------------------------------------ -;;; Completely Uninterruptible hang in re-search-backward (Was: java-mode) -(defbug 6 - (switch-to-buffer bug-buffer) - (insert "{ -public static void main(String[] args) throws java.io.IOException - { - } -} -") - (goto-char (point-min)) - (search-forward "{" nil nil 2) - (backward-char) - (re-search-backward - "^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s(")) - - -;;; ------------------------------------------------------------------ -;;; regexp crash -;; This doesn't crash for me. -sb -(defbug 7 - (string-match "\\(\\s-\\|$\\)" "å")) - - -;;;; ------------------------------------------------------------------- -;;;; Bugs below this line have been fixed. -;;;; Keep these for regression testing -;;;; ------------------------------------------------------------------- - - -;;; ------------------------------------------------------------------ -;;; Infinite recursion crash - Segmentation Fault -(defbug 4 - (switch-to-buffer bug-buffer) - (insert "abcdefg") - (setq e (make-extent 1 4)) - (set-extent-property e 'face 'bold) - (set-extent-property e 'duplicable t) - (set-extent-property e 'replicating t) - (insert (buffer-string)) - (delete-region 8 9)) - -(defbug 5 - (interactive) - (with-temp-buffer - (insert "abc") - (forward-char -1) - (subst-char-in-region 1 4 ?b ?\344) - (if (not (= (point) 3)) - (message "Bug! point should equal 3 but is %d" (point))))) - -;;; crash popup frames FIXED -;;(global-set-key -;; [(alt meta control f12)] -;; (lambda () -;; (interactive) -;; (let ((f (selected-frame))) -;; (make-frame `(popup ,(selected-frame))) -;; (make-frame) -;; (sit-for 0) -;; (delete-frame f) -;; (save-buffers-kill-emacs)))) - -;;; crash on delete-frame-hook - FIXED! -;;(global-set-key -;; [(alt meta control f10)] -;; (lambda () -;; (interactive) -;; (setq delete-frame-hook -;; (lambda (frame) -;; (select-frame frame) -;; (kill-buffer (window-buffer (frame-selected-window frame))))))) - -;;; reproduce-bugs.el ends here diff -r 71bf2c5667ba -r 66411359ce4e tests/reproduce-crashes.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproduce-crashes.el Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,275 @@ +;;; reproduce-bugs.el --- reproduce bugs in XEmacs + +;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1997 Sun Microsystems, Inc. + +;; Keywords: bugs, crash, burn, die, croak, munge + +;; This file is part of XEmacs. + +;; This file is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; XEmacs is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with XEmacs; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. + +;;; Synched up with: Not in FSF. + +;;; Commentary: + +;; Reproduce XEmacs crashes, so that they can get fixed. +;; A table of bugs is created. You can list, describe, or reproduce bugs. + +;; Non-crash bugs should not be in this file; they should be placed in +;; an appropriate file in the tests/automated suite. +;; You may need to use a debug version of XEmacs to reproduce some of these. + +;; For XEmacs maintainers and other masochists. +;; It's a bad idea to rely on code in this file continuing to work in +;; the same way. :-) + +;; #### Bugs < 11 need to be tested and versions where they pass recorded. +;; #### Fixed bugs should become regression tests, maybe? +;; #### Non-crashes should be copied (not moved) to tests/automatic. +;; #### `list-bugs' should optionally sort on status. +;; #### Bugs that depend on features (eg, Mule) should check for them and +;; document them. + +;;; Code: + +;; UI entry points + +(defun reproduce-bug (number) + "Reproduce XEmacs bugs, so that they can get fixed. +Especially, make XEmacs crash. +See reproduce-bugs.el for bug descriptions and bug numbers. +A debug version of XEmacs may be needed to reproduce some bugs." + (interactive "nBug Number: ") + (funcall (nth 0 (gethash number bug-hashtable)))) + +(defun describe-bug (number &optional show-code) + "Describe the bug with index NUMBER in a popup window. +If optional argument SHOW-CODE is non-nil, also display the reproduction code." + (interactive "nBug number: \ncShow code? [y/N] ") + (setq show-code (cond ((not (interactive-p)) show-code) + ((member show-code '(?y ?Y)) t) + (t nil))) + (with-displaying-temp-buffer (format "Bug %d" number) + (let ((bug (gethash number bug-hashtable))) + (princ (format "Bug #%d is %s.\n%s\n\n%s" + number + (nth 1 bug) + (nth 2 bug) + (if show-code (pp-to-string (nth 0 bug)) "")))))) + +(defun list-bugs () + "List bugs most recent first, each with brief description in a popup window. +Assumes a maximum of 999 bugs and a minimum of 80 column width window." + (interactive) + (with-displaying-temp-buffer "*Bug list*" + (princ " # status description\n") + (let (buglist) + (maphash (lambda (number bug) + (push (format "%3d %-9s %s" + number + (nth 1 bug) + (let ((description (nth 2 bug))) + (save-match-data + (string-match "\\(.*\\)\\(\n\\|$\\)" + description) + (match-string 1 description)))) + buglist)) + bug-hashtable) + (setq buglist (sort buglist (lambda (b1 b2) (string< b2 b1)))) + (while buglist + (let ((bug (pop buglist))) + (princ (if (< (length bug) 79) bug (substring bug 0 78))) + (terpri)))))) + +;; Database and utilities (internal) + +(defvar bug-hashtable (make-hashtable 10) + "Table of bugs, keyed by bug index number. +The value is a list (LAMBDA STATUS DOCSTRING), where LAMBDA is a lambda +expression reproducing the bug, and STATUS and DOCSTRING describe the bug. +For details, see `defbug'.") + +(put 'defbug 'lisp-indent-function 'defun) +(defmacro defbug (bug-number status docstring &rest body) + "Record a bug with key BUG-NUMBER and value (LAMBDA STATUS DOCSTRING). +LAMBDA is a lambda expression which when called executes BODY. +BUG-NUMBER is the bug's index number, a positive integer. +STATUS is the current status of the bug, one of + fixed The bug has been diagnosed and fixed. + diagnosed The bug has been localized but not fixed. + current The bug has been reported and reproduced but cause is unknown. + legacy The bug is undocumented but presumed fixed. +DOCSTRING should be a string describing the bug, including any relevant +descriptive information and references to archived mailing list traffic or +a BTS issue. +BODY is a sequence of expressions to execute to reproduce the bug." + (let ((body (if (stringp docstring) body (cons docstring body))) + (docstring (if (stringp docstring) docstring "[docstring omitted]"))) + `(puthash ,bug-number + '((lambda () ,@body) ,status ,docstring) + bug-hashtable))) + +(defconst bug-buffer + (save-excursion + (set-buffer (get-buffer-create "*Bug*")) + (erase-buffer) + (current-buffer))) + + +;;; ------------------------------------------------------------------ +;;;; Bugs follow: + +(defbug 11 fixed + "Crash in search due to backward movement. +Need Mule build with error checking in 21.5.28. +Fatal error: assertion failed, +file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487, +(this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0) +Reported: <475B104F.2070807@barco.com> + <87hcixwkh4.fsf@uwakimon.sk.tsukuba.ac.jp> +Fixed: <87hcixwkh4.fsf@uwakimon.sk.tsukuba.ac.jp>" + (switch-to-buffer (get-buffer-create "*crash me*")) + ;; doozy is the keystroke equivalent of the keyboard macro + ;; "IAI" C-b C-b C-s C-x + (let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return + ?I ?A ?I + (control ?b) (control ?b) + (control ?s) (control ?w)])) + (execute-kbd-macro doozy))) + + +(defbug 10 current + "Crash on trace-function +Fatal error: assertion failed, file src/eval.c, line 1405, abort()" + (trace-function 'record-buffer bug-buffer) + (pop-to-buffer bug-buffer)) + + +(defbug 9 current + "Crashes with stack overflow +Should give error via barf-if-buffer-read-only +Fatal error: assertion failed, file src/eval.c, line 1874, abort() +This bug has been fixed. -sb" + (switch-to-buffer bug-buffer) + ;; The following line should contain a number of eight-bit characters + (insert "²èÌÌËè¤Î°ÜÆ°¤Ï¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£º£Å٤ϡ¢²èÌ̤ÎÃæ¤Ç¡¢ÆÃÄê¤Î¾ì") + (setq buffer-read-only t) + (ignore-errors + (encode-coding-region (point-min) (point-max) 'euc-japan)) + (garbage-collect)) + + +(defbug 8 current + "Crashes in debug version only +Fatal error: assertion failed, file src/objects.h, line 149, +RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj)" + (let (glyph ext) + (make-face 'adobe-symbol-face) + (set-face-font + 'adobe-symbol-face + "-adobe-symbol-medium-r-normal--*-140-*-*-p-*-adobe-fontspecific") + (setq glyph (make-glyph (list (vector 'string + :data (char-to-string ?\xD3))))) + (set-glyph-face glyph 'adobe-symbol-face) + (setq ext (make-extent 14 18)) + (set-extent-property ext 'begin-glyph glyph))) + + +(defbug 7 current + "(maybe?) crash koi8 +ACCL: Invalid command (c) +With debugging on, crashes as follows: +Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj)" + ;;(load "cyrillic") + ;;(load "cyrillic-hooks") + (princ (decode-coding-string "\xe1" 'koi8))) + + +(defbug 6 current + "regexp crash +This doesn't crash for me. -sb" + (string-match "\\(\\s-\\|$\\)" "å")) + + +(defbug 5 legacy + "`subst-char-in-region' moves point." + (interactive) + (with-temp-buffer + (insert "abc") + (forward-char -1) + (subst-char-in-region 1 4 ?b ?\344) + (if (not (= (point) 3)) + (message "Bug! point should equal 3 but is %d" (point))))) + + +(defbug 4 legacy + "Infinite recursion crash - Segmentation Fault" + (switch-to-buffer bug-buffer) + (insert "abcdefg") + (setq e (make-extent 1 4)) + (set-extent-property e 'face 'bold) + (set-extent-property e 'duplicable t) + (set-extent-property e 'replicating t) + (insert (buffer-string)) + (delete-region 8 9)) + + +(defbug 3 current + "Completely Uninterruptible hang in re-search-backward (Was: java-mode)" + (switch-to-buffer bug-buffer) + (insert "{ +public static void main(String[] args) throws java.io.IOException + { + } +} +") + (goto-char (point-min)) + (search-forward "{" nil nil 2) + (backward-char) + (re-search-backward + "^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s(")) + + +(defbug 2 legacy + "crash popup frames +FIXED +#### This bug is not understood, and may be incomplete. See source." + (lambda () + (let ((f (selected-frame))) + (make-frame `(popup ,(selected-frame))) + (make-frame) + (sit-for 0) + (delete-frame f) + ;; #### Check whether this is needed. + ;; (save-buffers-kill-emacs5) + ))) + + +(defbug 1 legacy + "crash on delete-frame-hook +FIXED! +#### This bug is not understood, and seems to be incomplete. See source." + (lambda () + ;; #### Should this be add-hook instead of setq? + (setq delete-frame-hook + (lambda (frame) + (select-frame frame) + (kill-buffer (window-buffer (frame-selected-window frame))) + ;; #### Do we need to delete a frame here or something? + )))) + +;;; reproduce-bugs.el ends here diff -r 71bf2c5667ba -r 66411359ce4e version.sh --- a/version.sh Sat Oct 25 20:35:36 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -#!/bin/sh -emacs_is_beta=t -emacs_major_version=21 -emacs_minor_version=5 -emacs_beta_version=28 -xemacs_codename="fuki" -emacs_kit_version= -infodock_major_version=4 -infodock_minor_version=0 -infodock_build_version=8 -xemacs_extra_name="" -xemacs_release_date="2007-05-21" diff -r 71bf2c5667ba -r 66411359ce4e version.sh.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/version.sh.in Sat Oct 25 21:40:46 2008 +0900 @@ -0,0 +1,12 @@ +#!/bin/sh +emacs_is_beta=t +emacs_major_version=21 +emacs_minor_version=5 +emacs_beta_version=28 +xemacs_codename="fuki" +emacs_kit_version= +infodock_major_version=4 +infodock_minor_version=0 +infodock_build_version=8 +xemacs_release_date="2007-05-21" +xemacs_extra_name= \ No newline at end of file