carbon2-commit: Provide a DEFAULT argument in #'intern-soft.
16 years, 12 months
Aidan Kehoe
changeset: 4365:a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443
parent: 4353:4143b78d0df09521124aed8cd0ed848b978130ba
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Dec 24 14:00:14 2007 +0100
files: src/ChangeLog src/keymap.c src/lisp.h src/symbols.c
description:
Provide a DEFAULT argument in #'intern-soft.
2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.)
* keymap.c (define_key_check_and_coerce_keysym):
Call Fintern_soft with its new argument.
* lisp.h:
Update the declaration of Fintern_soft.
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/ChangeLog
--- a/src/ChangeLog Sun Dec 23 15:29:17 2007 +0100
+++ b/src/ChangeLog Mon Dec 24 14:00:14 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-23 Aidan Kehoe <kehoea@parhasa
+2007-12-24 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* objects-tty.c (tty_find_charset_font):
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/keymap.c
--- a/src/keymap.c Sun Dec 23 15:29:17 2007 +0100
+++ b/src/keymap.c Mon Dec 24 14:00:14 2007 +0100
@@ -1388,7 +1388,7 @@ define_key_check_and_coerce_keysym (Lisp
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;
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/lisp.h
--- a/src/lisp.h Sun Dec 23 15:29:17 2007 +0100
+++ b/src/lisp.h Mon Dec 24 14:00:14 2007 +0100
@@ -5067,7 +5067,7 @@ EXFUN (Ffboundp, 1);
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);
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r a2af1ff1761f3f9bda5a676bc93b9b3b5bdc1443 src/symbols.c
--- a/src/symbols.c Sun Dec 23 15:29:17 2007 +0100
+++ b/src/symbols.c Mon Dec 24 14:00:14 2007 +0100
@@ -256,17 +256,17 @@ it defaults to the value of the variable
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'.
-*/
- (name, obarray))
-{
- /* #### Bug! (intern-soft "nil") returns nil. Perhaps we should
- add a DEFAULT-IF-NOT-FOUND arg, like in get. */
+Optional third argument DEFAULT says what Lisp object to return if there is
+no canonical symbol named NAME, and defaults to nil.
+*/
+ (name, obarray, default_))
+{
Lisp_Object tem;
Lisp_Object string;
@@ -283,7 +283,7 @@ it defaults to the value of the variable
tem = oblookup (obarray, XSTRING_DATA (string), XSTRING_LENGTH (string));
if (INTP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
- return Qnil;
+ return default_;
else
return tem;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Add support for installing bundled patches.
16 years, 12 months
Aidan Kehoe
changeset: 4364:232d873b9705ad6655ef42e6f59cecadc3100853
parent: 4353:4143b78d0df09521124aed8cd0ed848b978130ba
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sun Dec 23 20:32:16 2007 -0800
files: .hgignore ChangeLog Makefile.in.in etc/ChangeLog etc/bundled-packages/README etc/bundled-packages/test.sh
description:
Add support for installing bundled patches.
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 .hgignore
--- a/.hgignore Sun Dec 23 15:29:17 2007 +0100
+++ b/.hgignore Sun Dec 23 20:32:16 2007 -0800
@@ -44,4 +44,4 @@ info/.*\.info(-[0-9]+)?$
^src/xemacs\.def(\.in)?$
^src/xemacs\.dmp$
^src/Emacs\.ad\.h$
-
+^etc/bundled-packages/.*\.tar\.gz$
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 ChangeLog
--- a/ChangeLog Sun Dec 23 15:29:17 2007 +0100
+++ b/ChangeLog Sun Dec 23 20:32:16 2007 -0800
@@ -1,3 +1,14 @@ 2007-12-08 Jerry James <james(a)xemacs.o
+2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * 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 <james(a)xemacs.org>
* config.guess:
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 Makefile.in.in
--- a/Makefile.in.in Sun Dec 23 15:29:17 2007 +0100
+++ b/Makefile.in.in Sun Dec 23 20:32:16 2007 -0800
@@ -491,6 +491,48 @@ mkdir: FRC.mkdir
#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, 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, 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, type:"; \
+ echo " make install-all-packages"; \
+ fi;
+
+mkpkgdir: FRC.mkdir ${MAKEPATH}
+ @if test -z ${package_path}; \
+ then echo "not configured --with-late-packages; no place 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 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 etc/ChangeLog
--- a/etc/ChangeLog Sun Dec 23 15:29:17 2007 +0100
+++ b/etc/ChangeLog Sun Dec 23 20:32:16 2007 -0800
@@ -1,3 +1,8 @@ 2007-11-22 Vin Shelton <acs(a)xemacs.org
+2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * bundled-packages/README: Documentation for bundled packages.
+ * bundled-packages/test.sh: Test suite for bundled packages.
+
2007-11-22 Vin Shelton <acs(a)xemacs.org>
* photos/vin.png:
diff -r 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 etc/bundled-packages/README
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/bundled-packages/README Sun Dec 23 20:32:16 2007 -0800
@@ -0,0 +1,68 @@
+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 the path to the directory containing the
+xemacs-packages and mule-packages hierarchies to install.
+
+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 4143b78d0df09521124aed8cd0ed848b978130ba -r 232d873b9705ad6655ef42e6f59cecadc3100853 etc/bundled-packages/test.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/bundled-packages/test.sh Sun Dec 23 20:32:16 2007 -0800
@@ -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
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Automated merge with file:/Sources/xemacs-21.5-checked-out
16 years, 12 months
Aidan Kehoe
changeset: 4370:b94710365f92d6c1d9f65e9c982320b389b95bd8
tag: tip
parent: 4369:ef9eb714f0e4f7e3ce0b25501288563ec23a8d13
parent: 4368:1740095ec116f9e1cbd7db413b98c22e3a56f862
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 30 16:19:21 2007 +0100
files: lisp/ChangeLog
description:
Automated merge with file:/Sources/xemacs-21.5-checked-out
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 ChangeLog
--- a/ChangeLog Sun Dec 30 16:18:33 2007 +0100
+++ b/ChangeLog Sun Dec 30 16:19:21 2007 +0100
@@ -1,3 +1,12 @@ 2007-12-23 Stephen J. Turnbull <stephe
+2007-12-26 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * Makefile.in.in (mkpkgdir): Ensure only one late package directory.
+
+2007-12-26 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * Makefile.in.in (check-available-packages): Say where to install.
+ (mkpkgdir):
+
2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* Makefile.in.in (mkpkgdir):
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 Makefile.in.in
--- a/Makefile.in.in Sun Dec 30 16:18:33 2007 +0100
+++ b/Makefile.in.in Sun Dec 30 16:19:21 2007 +0100
@@ -500,21 +500,31 @@ pkgsrcdir = ${srcdir}/etc/bundled-packag
check-available-packages:
@if test -r ${pkgsrcdir}/bootstrap.tar.gz; \
- then echo "To install a set of bootstrap packages, type:"; \
+ 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, type:"; \
+ 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, type:"; \
+ then echo "To install the full set of packages with mule in"; \
+ echo "${package_path}/mule-packages, type:"; \
echo " make install-all-packages"; \
- fi;
+ 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."; \
+ 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; \
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 etc/ChangeLog
--- a/etc/ChangeLog Sun Dec 30 16:18:33 2007 +0100
+++ b/etc/ChangeLog Sun Dec 30 16:19:21 2007 +0100
@@ -1,3 +1,7 @@ 2007-12-23 Stephen J. Turnbull <stephe
+2007-12-26 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * bundled-packages/README: Document restriction on --with-late-packages.
+
2007-12-23 Stephen J. Turnbull <stephen(a)xemacs.org>
* bundled-packages/README: Documentation for bundled packages.
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 etc/bundled-packages/README
--- a/etc/bundled-packages/README Sun Dec 30 16:18:33 2007 +0100
+++ b/etc/bundled-packages/README Sun Dec 30 16:19:21 2007 +0100
@@ -1,10 +1,13 @@ Package distributions may be placed in t
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.
+using the top-level Makefile.
To configure the package path, use the --with-late-packages option to
-configure, which specifies the path to the directory containing the
-xemacs-packages and mule-packages hierarchies to install.
+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
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Dec 30 16:18:33 2007 +0100
+++ b/lisp/ChangeLog Sun Dec 30 16:19:21 2007 +0100
@@ -11,6 +11,33 @@ 2007-12-30 Aidan Kehoe <kehoea@parhasa
cl.el's #'loop.
* iso8859-1.el (ctl-arrow):
Initialise it to something more comprehensible.
+
+2007-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
+
+ * 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 <mike(a)xemacs.org>
+
+ * 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 <stephen(a)xemacs.org>
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 lisp/font.el
--- a/lisp/font.el Sun Dec 30 16:18:33 2007 +0100
+++ b/lisp/font.el Sun Dec 30 16:19:21 2007 +0100
@@ -813,7 +813,7 @@ Optional DEVICE defaults to `default-x-d
(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 ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 lisp/fontconfig.el
--- a/lisp/fontconfig.el Sun Dec 30 16:18:33 2007 +0100
+++ b/lisp/fontconfig.el Sun Dec 30 16:19:21 2007 +0100
@@ -350,6 +350,21 @@ corresponding Xft font slant constant."
(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.
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 lisp/glyphs.el
--- a/lisp/glyphs.el Sun Dec 30 16:18:33 2007 +0100
+++ b/lisp/glyphs.el Sun Dec 30 16:19:21 2007 +0100
@@ -1185,8 +1185,7 @@ If unspecified in a particular domain, `
[jpeg :data nil] 2)))
,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2)))
,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2)))
- ;; No, I don't think we want to inline images... -- dvl
- ;; ("" [string :data nil] 2)
+ ("" [string :data nil] 2)
("" [nothing]))))
;; #### this should really be formatted-string, not string but we
;; don't have it implemented yet
@@ -1210,8 +1209,7 @@ If unspecified in a particular domain, `
("\\`\377\330\377\340\000\020JFIF" [string :data "[jpeg]"])
("\\.png\\'" [string :data nil] 2)
("\\`\211PNG" [string :data "[png]"])
- ;; No, I don't think we want to inline images... -- dvl
- ;;("" [string :data nil] 2)
+ ("" [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])))
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 lisp/loadhist.el
--- a/lisp/loadhist.el Sun Dec 30 16:18:33 2007 +0100
+++ b/lisp/loadhist.el Sun Dec 30 16:19:21 2007 +0100
@@ -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 ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 src/ChangeLog
--- a/src/ChangeLog Sun Dec 30 16:18:33 2007 +0100
+++ b/src/ChangeLog Sun Dec 30 16:19:21 2007 +0100
@@ -1,3 +1,17 @@ 2007-12-24 Aidan Kehoe <kehoea@parhasa
+2007-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* symbols.c (Fintern_soft):
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 src/doc.c
--- a/src/doc.c Sun Dec 30 16:18:33 2007 +0100
+++ b/src/doc.c Sun Dec 30 16:19:21 2007 +0100
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
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,28 @@ weird_doc (Lisp_Object sym, const CIbyte
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 +536,7 @@ Don't use this. Use the more general `s
(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 +1280,8 @@ syms_of_doc (void)
DEFSUBR (Fsnarf_documentation);
DEFSUBR (Fverify_documentation);
DEFSUBR (Fsubstitute_command_keys);
+
+ DEFSYMBOL (Qdefvar);
}
void
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 src/event-xlike-inc.c
--- a/src/event-xlike-inc.c Sun Dec 30 16:18:33 2007 +0100
+++ b/src/event-xlike-inc.c Sun Dec 30 16:19:21 2007 +0100
@@ -708,7 +708,15 @@ gtk_keysym_to_character(guint keysym)
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 ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 tests/ChangeLog
--- a/tests/ChangeLog Sun Dec 30 16:18:33 2007 +0100
+++ b/tests/ChangeLog Sun Dec 30 16:19:21 2007 +0100
@@ -1,3 +1,11 @@ 2007-12-21 Stephen J. Turnbull <stephe
+2007-12-29 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * 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 <stephen(a)xemacs.org>
* reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do.
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 tests/automated/test-harness.el
--- a/tests/automated/test-harness.el Sun Dec 30 16:18:33 2007 +0100
+++ b/tests/automated/test-harness.el Sun Dec 30 16:19:21 2007 +0100
@@ -71,7 +71,17 @@ on the system, or a system error might o
(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))
diff -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 -r b94710365f92d6c1d9f65e9c982320b389b95bd8 tests/automated/weak-tests.el
--- a/tests/automated/weak-tests.el Sun Dec 30 16:18:33 2007 +0100
+++ b/tests/automated/weak-tests.el Sun Dec 30 16:19:21 2007 +0100
@@ -35,11 +35,6 @@
(when (and (boundp 'load-file-name) (stringp load-file-name))
(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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
16 years, 12 months
Aidan Kehoe
changeset: 4369:ef9eb714f0e4f7e3ce0b25501288563ec23a8d13
parent: 4356:cc293ef846d240af187a523bb32eb5e26a083531
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 30 16:18:33 2007 +0100
files: lisp/ChangeLog lisp/iso8859-1.el lisp/subr.el
description:
Add ascii-case-table, #'with-case-table; make iso8859-1.el more comprehensible.
2007-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.
diff -r cc293ef846d240af187a523bb32eb5e26a083531 -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Dec 24 14:00:51 2007 +0100
+++ b/lisp/ChangeLog Sun Dec 30 16:18:33 2007 +0100
@@ -1,3 +1,17 @@ 2007-12-22 Stephen J. Turnbull <stephe
+2007-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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-22 Stephen J. Turnbull <stephen(a)xemacs.org>
Factor out lists of operators specially treated by `make-autoload'.
diff -r cc293ef846d240af187a523bb32eb5e26a083531 -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 lisp/iso8859-1.el
--- a/lisp/iso8859-1.el Mon Dec 24 14:00:51 2007 +0100
+++ b/lisp/iso8859-1.el Sun Dec 30 16:18:33 2007 +0100
@@ -28,71 +28,60 @@
;;; 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.")
+(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 lower 'character)
+ (coerce upper 'character)
+ table)
+ finally return table)
+ "Case table for the ASCII character set.")
-;;; This macro expands into
-;;; (setq iso8859/1-case-table (purecopy '("..." nil nil nil)))
-;;; doing the computation of the case table at compile-time.
+(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))
-((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
- )
-
-(set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table))
-
-(setq-default ctl-arrow 'iso-8859/1)
-
-(provide 'iso8859-1)
+;; Everything Latin-1 and above should be displayed as its character value
+;; by default.
+(setq-default ctl-arrow #xA0)
;;; iso8859-1.el ends here
diff -r cc293ef846d240af187a523bb32eb5e26a083531 -r ef9eb714f0e4f7e3ce0b25501288563ec23a8d13 lisp/subr.el
--- a/lisp/subr.el Mon Dec 24 14:00:51 2007 +0100
+++ b/lisp/subr.el Sun Dec 30 16:18:33 2007 +0100
@@ -579,6 +579,19 @@ See also `with-temp-file' and `with-outp
; . ,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.")
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Automated merge with file:/Sources/xemacs-21.5-checked-out
16 years, 12 months
Aidan Kehoe
changeset: 4368:1740095ec116f9e1cbd7db413b98c22e3a56f862
tag: tip
parent: 4367:69e6352406f0393738f99a6d250c351e7016f47b
parent: 4366:7b628daa39d4f27558b6b0f1a43e692cc7062a15
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 30 15:34:02 2007 +0100
files:
description:
Automated merge with file:/Sources/xemacs-21.5-checked-out
diff -r 69e6352406f0393738f99a6d250c351e7016f47b -r 1740095ec116f9e1cbd7db413b98c22e3a56f862 tests/ChangeLog
--- a/tests/ChangeLog Sun Dec 30 15:33:13 2007 +0100
+++ b/tests/ChangeLog Sun Dec 30 15:34:02 2007 +0100
@@ -1,3 +1,11 @@ 2007-12-21 Stephen J. Turnbull <stephe
+2007-12-29 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * 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 <stephen(a)xemacs.org>
* reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do.
diff -r 69e6352406f0393738f99a6d250c351e7016f47b -r 1740095ec116f9e1cbd7db413b98c22e3a56f862 tests/automated/test-harness.el
--- a/tests/automated/test-harness.el Sun Dec 30 15:33:13 2007 +0100
+++ b/tests/automated/test-harness.el Sun Dec 30 15:34:02 2007 +0100
@@ -71,7 +71,17 @@ on the system, or a system error might o
(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))
diff -r 69e6352406f0393738f99a6d250c351e7016f47b -r 1740095ec116f9e1cbd7db413b98c22e3a56f862 tests/automated/weak-tests.el
--- a/tests/automated/weak-tests.el Sun Dec 30 15:33:13 2007 +0100
+++ b/tests/automated/weak-tests.el Sun Dec 30 15:34:02 2007 +0100
@@ -35,11 +35,6 @@
(when (and (boundp 'load-file-name) (stringp load-file-name))
(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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT PACKAGES] Accept built-in macros in #'find-func
16 years, 12 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
xemacs-packages/xemacs-devel/ChangeLog addition:
2007-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* find-func.el (find-function-C-source):
Accept built-in macros in this function.
XEmacs Packages source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/xemacs-devel/find-func.el
===================================================================
RCS
Index: xemacs-packages/xemacs-devel/find-func.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xemacs-devel/find-func.el,v
retrieving revision 1.11
diff -u -u -r1.11 find-func.el
--- xemacs-packages/xemacs-devel/find-func.el 2006/08/06 09:51:25 1.11
+++ xemacs-packages/xemacs-devel/find-func.el 2007/12/30 14:23:51
@@ -201,7 +201,11 @@
"\"")
(concat "DEFUN\\(_NORETURN\\|_MANY\\|_UNEVALLED"
"\\|_COMMAND_LOOP\\|\\)[ \t\n]*([ \t\n]*\""
- (regexp-quote (subr-name fun-or-var))
+ (regexp-quote (subr-name
+ (if (consp fun-or-var)
+ ;; it can be a macro.
+ (cdr-safe fun-or-var)
+ fun-or-var)))
"\""))
nil t)
(error "Can't find source for %s" fun-or-var))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Move debugging code to usage example.
16 years, 12 months
Stephen Turnbull
changeset: 4366:7b628daa39d4f27558b6b0f1a43e692cc7062a15
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Sat Dec 29 20:22:04 2007 -0800
files: tests/ChangeLog tests/automated/test-harness.el tests/automated/weak-tests.el
description:
Move debugging code to usage example.
* automated/test-harness.el (test-harness-test-compiled): Improve docstring.
* automated/weak-tests.el (test-harness-test-compiled): Remove debugging code.
diff -r c9ab656691c04f41c53df820c0a83e4ee36f5177 -r 7b628daa39d4f27558b6b0f1a43e692cc7062a15 tests/ChangeLog
--- a/tests/ChangeLog Thu Dec 27 13:22:26 2007 +0100
+++ b/tests/ChangeLog Sat Dec 29 20:22:04 2007 -0800
@@ -1,3 +1,11 @@ 2007-12-21 Stephen J. Turnbull <stephe
+2007-12-29 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * 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 <stephen(a)xemacs.org>
* reproduce-crashes.el: Renamed from reproduce-bugs.el. Update to-do.
diff -r c9ab656691c04f41c53df820c0a83e4ee36f5177 -r 7b628daa39d4f27558b6b0f1a43e692cc7062a15 tests/automated/test-harness.el
--- a/tests/automated/test-harness.el Thu Dec 27 13:22:26 2007 +0100
+++ b/tests/automated/test-harness.el Sat Dec 29 20:22:04 2007 -0800
@@ -71,7 +71,17 @@ on the system, or a system error might o
(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))
diff -r c9ab656691c04f41c53df820c0a83e4ee36f5177 -r 7b628daa39d4f27558b6b0f1a43e692cc7062a15 tests/automated/weak-tests.el
--- a/tests/automated/weak-tests.el Thu Dec 27 13:22:26 2007 +0100
+++ b/tests/automated/weak-tests.el Sat Dec 29 20:22:04 2007 -0800
@@ -35,11 +35,6 @@
(when (and (boundp 'load-file-name) (stringp load-file-name))
(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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [PATCH] Abstract out a display-table-specific API (2)
16 years, 12 months
Aidan Kehoe
Ar an triochadú lá de mí na Nollaig, scríobh Stephen J. Turnbull:
> QUERY
>
> Aidan Kehoe writes:
>
> > * gamegrid.el (put-display-table): New.
> > * gamegrid.el (get-display-table): New.
> > Provide with #'defun-when-void, so as to not override the 21.5
> > implementation.
>
> Is there any chance you could name these `display-table-get' and
> `display-table-put'? Yes, I know there's precedent for the prefix
> form in `puthash' and `put-char-table' (and others), but `hash' can be
> read as the object (ie, the key), and put-char-table and friends have
> always made me ask "where should we put the char-table?" There's
> plenty of precedent for the postfix form (C-h a -put$ RET will give a
> list), and it's more Lisp-y.
Not emacs-Lisp-y, though (F1 a ^put- RET vs F1 a -put$ RET):
put-alist
put-case-table
put-case-table-pair
put-char-code-property
put-char-table
put-charset-property
put-database
put-nonduplicable-text-property
put-range-table
put-text-property
vs:
coding-system-put
lax-plist-put
overlay-put
plist-put
widget-put
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[C] Fix for cmuscheme
16 years, 12 months
Michael Sperber
2007-12-28 Mike Sperber <mike(a)xemacs.org>
* cmuscheme.el (scheme-args-to-list): If the command line is
empty, don't create an empty argument.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
Index: cmuscheme.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/scheme/cmuscheme.el,v
retrieving revision 1.5
diff -u -r1.5 cmuscheme.el
--- cmuscheme.el 23 Aug 2007 07:02:39 -0000 1.5
+++ cmuscheme.el 28 Dec 2007 12:57:28 -0000
@@ -171,7 +171,10 @@
(defun scheme-args-to-list (string)
(let ((where (string-match "[ \t]" string)))
- (cond ((null where) (list string))
+ (cond ((null where)
+ (if (string-equal "" string)
+ '()
+ (list string)))
((not (= where 0))
(cons (substring string 0 where)
(scheme-args-to-list (substring string (+ 1 where)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches