commit: Fix the broken bigfloat-to-string conversion function.
16 years, 1 month
Jerry James
changeset: 4612:313c2cc696b9887858b97356501335262f1f82d6
user: Jerry James <james(a)xemacs.org>
date: Wed Feb 11 09:20:47 2009 -0700
files: src/number-gmp.c
description:
Fix the broken bigfloat-to-string conversion function.
diff -r 9c97a5a8c241b5216f8f9d6efa1f65e40e78f7bf -r 313c2cc696b9887858b97356501335262f1f82d6 src/number-gmp.c
--- a/src/number-gmp.c Wed Feb 11 15:30:59 2009 +0000
+++ b/src/number-gmp.c Wed Feb 11 09:20:47 2009 -0700
@@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "lisp.h"
#include "sysproc.h" /* For qxe_getpid */
-static mpf_t float_print_min, float_print_max;
+static mp_exp_t float_print_min, float_print_max;
gmp_randstate_t random_state;
CIbyte *
@@ -38,40 +38,56 @@ bigfloat_to_string(mpf_t f, int base)
const int neg = (sign < 0) ? 1 : 0;
int len = strlen (str) + 1; /* Count the null terminator */
- if (sign == 0 || (mpf_cmp (float_print_min, f) <= 0 &&
- mpf_cmp (f, float_print_max) <= 0))
+ if (sign == 0)
{
- /* Move digits down to insert a radix point */
- if (expt <= 0)
- {
- /* We need room for a radix point and leading zeroes */
- const int space = -expt + 2;
- XREALLOC_ARRAY (str, CIbyte, len + space);
- memmove (&str[space + neg], &str[neg], len - neg);
- memset (&str[neg], '0', space);
- str[neg + 1] = '.';
- len += space;
- }
+ XREALLOC_ARRAY (str, CIbyte, 4);
+ strncpy (str, "0.0", 4);
+ }
+ else if (float_print_min <= expt && expt <= float_print_max)
+ {
+ if (expt < 0)
+ {
+ /* We need room for a radix point and leading zeroes */
+ const int space = -expt + 2;
+ XREALLOC_ARRAY (str, CIbyte, len + space);
+ memmove (&str[space + neg], &str[neg], len - neg);
+ memset (&str[neg], '0', space);
+ str[neg + 1] = '.';
+ }
+ else if (len <= expt + neg + 1)
+ {
+ /* We need room for a radix point and trailing zeroes */
+ XREALLOC_ARRAY (str, CIbyte, expt + neg + 3);
+ memset (&str[len - 1], '0', expt + neg + 3 - len);
+ str[expt + neg] = '.';
+ str[expt + neg + 2] = '\0';
+ }
else
- {
- /* We just need room for a radix point */
- XREALLOC_ARRAY (str, CIbyte, len + 1);
- memmove (&str[expt + neg + 1], &str[expt + neg], len - (expt + neg));
- str[expt + neg] = '.';
- len++;
- }
+ {
+ /* We just need room for a radix point */
+ XREALLOC_ARRAY (str, CIbyte, len + 1);
+ memmove (&str[expt + neg + 1], &str[expt + neg], len - (expt + neg));
+ str[expt + neg] = '.';
+ }
}
else
{
- /* Computerized scientific notation */
- /* We need room for a radix point, format identifier, and exponent */
- const int space = (expt < 0)
- ? (int)(log ((double) (-expt)) / log ((double) base)) + 3
-: (int)(log ((double) expt) / log ((double) base)) + 2;
+ /* Computerized scientific notation: We need room for a possible radix
+ point, format identifier, and exponent */
+ /* GMP's idea of the exponent is 1 greater than scientific notation's */
+ expt--;
+ const int point = (len == neg + 2) ? 0 : 1;
+ const int exponent = (expt < 0)
+ ? (int)(log ((double) (-expt)) / log ((double) base)) + 3
+ : (int)(log ((double) expt) / log ((double) base)) + 2;
+ const int space = point + exponent;
XREALLOC_ARRAY (str, CIbyte, len + space);
- memmove (&str[neg + 2], &str[neg + 1], len - neg);
- str[len + 1] = 'l';
- sprintf (&str[len + 2], "%ld", expt);
+ if (point > 0)
+ {
+ memmove (&str[neg + 2], &str[neg + 1], len - neg);
+ str[neg + 1] = '.';
+ }
+ sprintf (&str[len + point - 1], "E%ld", expt);
}
return str;
}
@@ -94,11 +110,13 @@ init_number_gmp ()
mp_set_memory_functions ((void *(*) (size_t)) xmalloc, gmp_realloc,
gmp_free);
- /* The smallest number that is printed without exponents */
- mpf_init_set_d (float_print_min, 0.001);
+ /* Numbers with smaller exponents than this are printed in scientific
+ notation. */
+ float_print_min = -4;
- /* The largest number that is printed without exponents */
- mpf_init_set_ui (float_print_max, 10000000UL);
+ /* Numbers with larger exponents than this are printed in scientific
+ notation. */
+ float_print_max = 8;
/* Prepare the bignum/bigfloat random number generator */
gmp_randinit_default (random_state);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: The URLs in our current config.guess and config.sub files are obsolete.
16 years, 1 month
Jerry James
changeset: 4614:afbfad080ddd46dd1a5b6be0dca8c1d81d7961fd
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Wed Feb 11 11:09:35 2009 -0700
files: ChangeLog config.guess config.sub
description:
The URLs in our current config.guess and config.sub files are obsolete.
Update to the latest upstream release to get correct URLs, as well as fixes
and enhancements to those scripts.
diff -r e254bf96eb9e0bca94f4a7fd104077f6264e8918 -r afbfad080ddd46dd1a5b6be0dca8c1d81d7961fd ChangeLog
--- a/ChangeLog Wed Feb 11 09:23:03 2009 -0700
+++ b/ChangeLog Wed Feb 11 11:09:35 2009 -0700
@@ -1,3 +1,8 @@ 2009-01-31 Stephen J. Turnbull <stephe
+2009-02-11 Jerry James <james(a)xemacs.org>
+
+ * config.guess:
+ * config.sub: Update to 2009-02-03 versions.
+
2009-01-31 Stephen J. Turnbull <stephen(a)xemacs.org>
* configure.ac: Adopt Martin's suggestion of declaring argv as
diff -r e254bf96eb9e0bca94f4a7fd104077f6264e8918 -r afbfad080ddd46dd1a5b6be0dca8c1d81d7961fd config.guess
--- a/config.guess Wed Feb 11 09:23:03 2009 -0700
+++ b/config.guess Wed Feb 11 11:09:35 2009 -0700
@@ -1,10 +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, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-12-05'
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+timestamp='2009-02-03'
# 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
@@ -56,8 +56,8 @@ GNU config.guess ($timestamp)
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -331,7 +331,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -532,7 +545,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
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
IBM_ARCH=rs6000
@@ -796,8 +809,11 @@ EOF
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd)
+ EM64T | authenticamd | genuineintel)
echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@@ -932,6 +948,9 @@ EOF
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -981,9 +1000,6 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
@@ -1138,6 +1154,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ 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; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1212,6 +1238,9 @@ EOF
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
@@ -1320,6 +1349,9 @@ EOF
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
@@ -1481,9 +1513,9 @@ the operating system you are using. It i
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.g...
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.gu...
and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.su...
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 e254bf96eb9e0bca94f4a7fd104077f6264e8918 -r afbfad080ddd46dd1a5b6be0dca8c1d81d7961fd config.sub
--- a/config.sub Wed Feb 11 09:23:03 2009 -0700
+++ b/config.sub Wed Feb 11 11:09:35 2009 -0700
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
-
-timestamp='2007-12-05'
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
+
+timestamp='2009-02-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +72,8 @@ version="\
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -122,6 +122,7 @@ case $maybe_os in
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -249,13 +250,16 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep \
+ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
- | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@@ -277,7 +281,7 @@ case $basic_machine in
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| score \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -286,7 +290,7 @@ case $basic_machine in
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -329,14 +333,17 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
- | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@@ -358,20 +365,20 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@@ -439,6 +446,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -459,6 +470,10 @@ case $basic_machine in
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -525,6 +540,10 @@ case $basic_machine in
delta88)
basic_machine=m88k-motorola
os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
;;
djgpp)
basic_machine=i586-pc
@@ -1049,6 +1068,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1122,6 +1145,10 @@ case $basic_machine in
;;
z8k-*-coff)
basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
os=-sim
;;
none)
@@ -1162,7 +1189,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1234,8 +1261,9 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1244,7 +1272,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1384,6 +1412,9 @@ case $os in
-zvmoe)
os=-zvmoe
;;
+ -dicos*)
+ os=-dicos
+ ;;
-none)
;;
*)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: How about if I make a ChangeLog entry for the number-gmp.c change?
16 years, 1 month
Jerry James
changeset: 4613:e254bf96eb9e0bca94f4a7fd104077f6264e8918
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Wed Feb 11 09:23:03 2009 -0700
files: src/ChangeLog
description:
How about if I make a ChangeLog entry for the number-gmp.c change?
diff -r 313c2cc696b9887858b97356501335262f1f82d6 -r e254bf96eb9e0bca94f4a7fd104077f6264e8918 src/ChangeLog
--- a/src/ChangeLog Wed Feb 11 09:20:47 2009 -0700
+++ b/src/ChangeLog Wed Feb 11 09:23:03 2009 -0700
@@ -1,3 +1,7 @@ 2009-02-10 Aidan Kehoe <kehoea@parhasa
+2009-02-11 Jerry James <james(a)xemacs.org>
+
+ * number-gmp.c (bigfloat_to_string): Fix broken string conversion.
+
2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
* lread.c (Fload_internal):
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Backed out changeset 38e8af61f38d
16 years, 1 month
Aidan Kehoe
changeset: 4611:9c97a5a8c241b5216f8f9d6efa1f65e40e78f7bf
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Feb 11 15:30:59 2009 +0000
files: lisp/ChangeLog lisp/process.el
description:
Backed out changeset 38e8af61f38d
As Vin points out in
20a807210902110554s40c75beai334c005940f6446e(a)mail.gmail.com , the
Windows-specific coding systems have no #'query-coding-region support right
now, it is not yet appropriate to require #'query-coding-region support on
Mule builds.
diff -r 38e8af61f38dcf558615694e65f7fb85c289c81b -r 9c97a5a8c241b5216f8f9d6efa1f65e40e78f7bf lisp/ChangeLog
--- a/lisp/ChangeLog Wed Feb 11 12:14:28 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 15:30:59 2009 +0000
@@ -1,10 +1,3 @@ 2009-02-11 Aidan Kehoe <kehoea@parhasa
-2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
-
- * process.el (setenv):
- Check whether the environment variable and value can be encoded by
- the native coding system, error if not, as does GNU Emacs (but our
- implementation is different).
-
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
diff -r 38e8af61f38dcf558615694e65f7fb85c289c81b -r 9c97a5a8c241b5216f8f9d6efa1f65e40e78f7bf lisp/process.el
--- a/lisp/process.el Wed Feb 11 12:14:28 2009 +0000
+++ b/lisp/process.el Wed Feb 11 15:30:59 2009 +0000
@@ -599,10 +599,17 @@ a side-effect."
(if substitute-env-vars
(setq value (substitute-env-vars value))))
- ;; XEmacs change: check whether the environment understands this variable,
- ;; using our function for exactly that, don't use
- ;; #'find-coding-systems-string or trust `undecided' to encode it.
- (query-coding-string (concat variable "=" value) 'native nil t)
+ ;; 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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Correct string offset and arg handling, #'query-coding-string and related.
16 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE; This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1234354286 0
# Node ID 33b8c874b2c86c5ae027cbf2a784ead324a73e56
# Parent 1e3cf11fa27dfd4bef80a31d356e914a3a7dc119
Correct string offset and arg handling, #'query-coding-string and related.
lisp/ChangeLog addition:
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
Correct the order of arguments passed to #'query-coding-region.
(unencodable-char-position):
Handle string offsets correctly, they're one less than buffer
offsets. Handle START and END correctly if passed a string.
diff -r 1e3cf11fa27d -r 33b8c874b2c8 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Feb 10 16:07:31 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 12:11:26 2009 +0000
@@ -1,3 +1,11 @@
+2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * coding.el (query-coding-string):
+ Correct the order of arguments passed to #'query-coding-region.
+ (unencodable-char-position):
+ Handle string offsets correctly, they're one less than buffer
+ offsets. Handle START and END correctly if passed a string.
+
2009-02-08 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (delete-duplicates):
diff -r 1e3cf11fa27d -r 33b8c874b2c8 lisp/coding.el
--- a/lisp/coding.el Tue Feb 10 16:07:31 2009 +0000
+++ b/lisp/coding.el Wed Feb 11 12:11:26 2009 +0000
@@ -507,8 +507,8 @@
(insert string)
(multiple-value-bind (result ranges extent)
(query-coding-region (point-min) (point-max) coding-system
- (current-buffer) errorp
- nil ignore-invalid-sequencesp)
+ (current-buffer) ignore-invalid-sequencesp
+ errorp)
(unless result
(map-range-table
#'(lambda (begin end value)
@@ -539,7 +539,7 @@
for un-encodable characters. In that case, START and END are indexes
in the string."
(let ((thunk
- #'(lambda (start end coding-system &optional count)
+ #'(lambda (start end coding-system stringp count)
(multiple-value-bind (result ranges)
(query-coding-region start end coding-system)
(if result
@@ -550,14 +550,15 @@
#'(lambda (begin end value)
(while (and (< begin end)
(< (length result) count))
- (push begin result)
+ (push (if stringp (1- begin) begin) result)
(incf begin))
(when (= (length result) count)
(return-from worked-it-all-out result)))
ranges)
(map-range-table
#'(lambda (begin end value)
- (return-from worked-it-all-out begin))
+ (return-from worked-it-all-out
+ (if stringp (1- begin) begin)))
ranges))
(assert (not (null count)) t
"We should never reach this point with null COUNT.")
@@ -572,8 +573,8 @@
(if string
(with-temp-buffer
(insert string)
- (funcall thunk start end coding-system count))
- (funcall thunk start end coding-system count))))
+ (funcall thunk (1+ start) (1+ end) coding-system t count))
+ (funcall thunk start end coding-system nil count))))
;; XEmacs; this is a GPLv3 function in coding.c in GNU. This is why we have
;; both a very divergent docstring and a very divergent implementation.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, 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] Check if env vars are encodable by native coding system, #'setenv
16 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE; This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1234354468 0
# Node ID 38e8af61f38dcf558615694e65f7fb85c289c81b
# Parent 33b8c874b2c86c5ae027cbf2a784ead324a73e56
Check if env vars are encodable by native coding system, #'setenv
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (setenv):
Check whether the environment variable and value can be encoded by
the native coding system, error if not, as does GNU Emacs (but our
implementation is different).
diff -r 33b8c874b2c8 -r 38e8af61f38d lisp/ChangeLog
--- a/lisp/ChangeLog Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 12:14:28 2009 +0000
@@ -1,3 +1,10 @@
+2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * process.el (setenv):
+ Check whether the environment variable and value can be encoded by
+ the native coding system, error if not, as does GNU Emacs (but our
+ implementation is different).
+
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
diff -r 33b8c874b2c8 -r 38e8af61f38d lisp/process.el
--- a/lisp/process.el Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/process.el Wed Feb 11 12:14:28 2009 +0000
@@ -599,17 +599,10 @@
(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.
+ ;; XEmacs change: check whether the environment understands this variable,
+ ;; using our function for exactly that, don't use
+ ;; #'find-coding-systems-string or trust `undecided' to encode it.
+ (query-coding-string (concat variable "=" value) 'native nil t)
(if (string-match "=" variable)
(error "Environment variable name `%s' contains `='" variable)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, 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: Check if env vars are encodable by native coding system, #'setenv
16 years, 1 month
Aidan Kehoe
changeset: 4610:38e8af61f38dcf558615694e65f7fb85c289c81b
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Feb 11 12:14:28 2009 +0000
files: lisp/ChangeLog lisp/process.el
description:
Check if env vars are encodable by native coding system, #'setenv
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* process.el (setenv):
Check whether the environment variable and value can be encoded by
the native coding system, error if not, as does GNU Emacs (but our
implementation is different).
diff -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 -r 38e8af61f38dcf558615694e65f7fb85c289c81b lisp/ChangeLog
--- a/lisp/ChangeLog Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 12:14:28 2009 +0000
@@ -1,3 +1,10 @@ 2009-02-11 Aidan Kehoe <kehoea@parhasa
+2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * process.el (setenv):
+ Check whether the environment variable and value can be encoded by
+ the native coding system, error if not, as does GNU Emacs (but our
+ implementation is different).
+
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
diff -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 -r 38e8af61f38dcf558615694e65f7fb85c289c81b lisp/process.el
--- a/lisp/process.el Wed Feb 11 12:11:26 2009 +0000
+++ b/lisp/process.el Wed Feb 11 12:14:28 2009 +0000
@@ -599,17 +599,10 @@ a side-effect."
(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.
+ ;; XEmacs change: check whether the environment understands this variable,
+ ;; using our function for exactly that, don't use
+ ;; #'find-coding-systems-string or trust `undecided' to encode it.
+ (query-coding-string (concat variable "=" value) 'native nil t)
(if (string-match "=" variable)
(error "Environment variable name `%s' contains `='" variable)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Correct string offset and arg handling, #'query-coding-string and related.
16 years, 1 month
Aidan Kehoe
changeset: 4609:33b8c874b2c86c5ae027cbf2a784ead324a73e56
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Feb 11 12:11:26 2009 +0000
files: lisp/ChangeLog lisp/coding.el
description:
Correct string offset and arg handling, #'query-coding-string and related.
lisp/ChangeLog addition:
2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
* coding.el (query-coding-string):
Correct the order of arguments passed to #'query-coding-region.
(unencodable-char-position):
Handle string offsets correctly, they're one less than buffer
offsets. Handle START and END correctly if passed a string.
diff -r 1e3cf11fa27dfd4bef80a31d356e914a3a7dc119 -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Feb 10 16:07:31 2009 +0000
+++ b/lisp/ChangeLog Wed Feb 11 12:11:26 2009 +0000
@@ -1,3 +1,11 @@ 2009-02-08 Aidan Kehoe <kehoea@parhasa
+2009-02-11 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * coding.el (query-coding-string):
+ Correct the order of arguments passed to #'query-coding-region.
+ (unencodable-char-position):
+ Handle string offsets correctly, they're one less than buffer
+ offsets. Handle START and END correctly if passed a string.
+
2009-02-08 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-macs.el (delete-duplicates):
diff -r 1e3cf11fa27dfd4bef80a31d356e914a3a7dc119 -r 33b8c874b2c86c5ae027cbf2a784ead324a73e56 lisp/coding.el
--- a/lisp/coding.el Tue Feb 10 16:07:31 2009 +0000
+++ b/lisp/coding.el Wed Feb 11 12:11:26 2009 +0000
@@ -507,8 +507,8 @@ range tables."
(insert string)
(multiple-value-bind (result ranges extent)
(query-coding-region (point-min) (point-max) coding-system
- (current-buffer) errorp
- nil ignore-invalid-sequencesp)
+ (current-buffer) ignore-invalid-sequencesp
+ errorp)
(unless result
(map-range-table
#'(lambda (begin end value)
@@ -539,7 +539,7 @@ for un-encodable characters. In that ca
for un-encodable characters. In that case, START and END are indexes
in the string."
(let ((thunk
- #'(lambda (start end coding-system &optional count)
+ #'(lambda (start end coding-system stringp count)
(multiple-value-bind (result ranges)
(query-coding-region start end coding-system)
(if result
@@ -550,14 +550,15 @@ in the string."
#'(lambda (begin end value)
(while (and (< begin end)
(< (length result) count))
- (push begin result)
+ (push (if stringp (1- begin) begin) result)
(incf begin))
(when (= (length result) count)
(return-from worked-it-all-out result)))
ranges)
(map-range-table
#'(lambda (begin end value)
- (return-from worked-it-all-out begin))
+ (return-from worked-it-all-out
+ (if stringp (1- begin) begin)))
ranges))
(assert (not (null count)) t
"We should never reach this point with null COUNT.")
@@ -572,8 +573,8 @@ in the string."
(if string
(with-temp-buffer
(insert string)
- (funcall thunk start end coding-system count))
- (funcall thunk start end coding-system count))))
+ (funcall thunk (1+ start) (1+ end) coding-system t count))
+ (funcall thunk start end coding-system nil count))))
;; XEmacs; this is a GPLv3 function in coding.c in GNU. This is why we have
;; both a very divergent docstring and a very divergent implementation.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: ediff and emacs-internal coding system
16 years, 1 month
Norbert Koch
* Michael Kifer <kifer(a)cs.sunysb.edu>:
Hi!
Could someone please have a look at the patch down below and apply it or
comment on it?
Thanks,
norbert.
> yes, would be good to add the emacs-internal coding system.
> But since xemacs packages are often used with older versions of XEmacs,
> I could instead use a coding system that works with older versions.
> What coding system corresponds to emacs-internal?
>
> michael
>
> On Sun, 08 Feb 2009 11:38:37 -0500
> Nelson Ferreira <njsf(a)sxemacs.org> wrote:
>
> > On Sunday 08 February 2009 08:02:33 am Norbert Koch wrote:
> > > * Nelson Ferreira <njsf(a)sxemacs.org>:
> > >
> > > Hello Nelson,
> > >
> > > > I updated my prerelease packages and ediff started complaining about not
> > > > having an emacs-internal coding system defined.
> > > >
> > > > I provided the patch for SXEmacs, but now I wonder if this was something
> > > > that escaped during an upstream merge?
> > >
> > > If a package has an active maintainer, as ediff does, I normally don't
> > > apply any patches to it. Have you contacted Michael with your patch?
> > > If not, could you please resend it to him?
> > >
> >
> > To be clear, I did not patch ediff, I added the emacs-internal coding system
> > to SXEmacs. I was checking with you, because I suspect XEmacs (at least 21.4)
> > will
> > have the same issue.
> >
> > Here follows the patch I submitted:
> >
> > --- orig/lisp/coding.el
> > +++ mod/lisp/coding.el
> > @@ -231,16 +231,19 @@
> > ;; these are so that gnus and friends work when not mule
> > (copy-coding-system 'undecided 'iso-8859-1)
> > (copy-coding-system 'undecided 'iso-8859-2)
> > -
> > + (copy-coding-system 'undecided 'iso-8859-15)
> > (define-coding-system-alias 'ctext 'binary))
> >
> >
> > ;; compatibility for old XEmacsen (don't use it)
> > (copy-coding-system 'undecided 'automatic-conversion)
> >
> > +;; compatibility for new Emacsen (don't use it)
> > +(copy-coding-system 'undecided 'emacs-internal)
> > +
> > (make-compatible-variable 'enable-multibyte-characters "Unimplemented")
> >
> > (define-obsolete-variable-alias
> > 'pathname-coding-system 'file-name-coding-system)
> >
> > -;;; mule-coding.el ends here
> > +;;; coding.el ends here
> >
> >
> >
> >
> >
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Make #$ truly read-only for Lisp; check this in the tests.
16 years, 1 month
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
If any package code actually modifies #$, it is incorrect and needs to be
fixed, and I have time to do that right now.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1234282051 0
# Node ID 1e3cf11fa27dfd4bef80a31d356e914a3a7dc119
# Parent 517f6887fbc0255ca386afb68f87444f7e93840e
Make #$ truly read-only for Lisp; check this in the test suite.
lisp/ChangeLog addition:
2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el :
Check that #$ is not modifiable from Lisp, and that load-file-name
is modifiable from Lisp.
src/ChangeLog addition:
2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
* lread.c (Fload_internal):
Make load-file-name-internal readonly for Lisp code; make
load-file-name a modifiable copy.
(init_lread):
Initialised Vload_file_name_internal, Vload_file_name to nil on
each post-dump start.
diff -r 517f6887fbc0 -r 1e3cf11fa27d src/ChangeLog
--- a/src/ChangeLog Sun Feb 08 18:45:22 2009 +0000
+++ b/src/ChangeLog Tue Feb 10 16:07:31 2009 +0000
@@ -1,3 +1,12 @@
+2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lread.c (Fload_internal):
+ Make load-file-name-internal readonly for Lisp code; make
+ load-file-name a modifiable copy.
+ (init_lread):
+ Initialised Vload_file_name_internal, Vload_file_name to nil on
+ each post-dump start.
+
2009-02-02 Stephen J. Turnbull <stephen(a)xemacs.org>
* frame-x.c (x_init_frame_2): Update comment per new info from HT.
diff -r 517f6887fbc0 -r 1e3cf11fa27d src/lread.c
--- a/src/lread.c Sun Feb 08 18:45:22 2009 +0000
+++ b/src/lread.c Tue Feb 10 16:07:31 2009 +0000
@@ -711,6 +711,8 @@
PRINT_LOADING_MESSAGE ("");
+ LISP_READONLY (found) = 1;
+
{
/* Lisp_Object's must be malloc'ed, not stack-allocated */
Lisp_Object lispstream = Qnil;
@@ -738,7 +740,8 @@
record_unwind_protect (load_force_doc_string_unwind,
Vload_force_doc_string_list);
Vload_force_doc_string_list = Qnil;
- internal_bind_lisp_object (&Vload_file_name, found);
+ /* load-file-name is not read-only to Lisp. */
+ internal_bind_lisp_object (&Vload_file_name, Fcopy_sequence(found));
#ifdef I18N3
/* set it to nil; a call to #'domain will set it. */
internal_bind_lisp_object (&Vfile_domain, Qnil);
@@ -3266,6 +3269,9 @@
Vread_buffer_stream = make_resizing_buffer_output_stream ();
Vload_force_doc_string_list = Qnil;
+
+ Vload_file_name_internal = Qnil;
+ Vload_file_name = Qnil;
}
void
diff -r 517f6887fbc0 -r 1e3cf11fa27d tests/ChangeLog
--- a/tests/ChangeLog Sun Feb 08 18:45:22 2009 +0000
+++ b/tests/ChangeLog Tue Feb 10 16:07:31 2009 +0000
@@ -1,3 +1,9 @@
+2009-02-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/lisp-tests.el :
+ Check that #$ is not modifiable from Lisp, and that load-file-name
+ is modifiable from Lisp.
+
2009-02-07 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/query-coding-tests.el:
diff -r 517f6887fbc0 -r 1e3cf11fa27d tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Sun Feb 08 18:45:22 2009 +0000
+++ b/tests/automated/lisp-tests.el Tue Feb 10 16:07:31 2009 +0000
@@ -1334,3 +1334,39 @@
(prin1-to-string char-table-with-symbol)))
"Check that char table elements are quoted correctly when printing"))
+
+(let ((test-file-name
+ (make-temp-file (expand-file-name "sR4KDwU" (temp-directory))
+ nil ".el")))
+ (find-file test-file-name)
+ (erase-buffer)
+ (insert
+ "\
+;; Lisp should not be able to modify #$, which is
+;; Vload_file_name_internal of lread.c.
+(Check-Error setting-constant (aset #$ 0 ?\\ ))
+
+;; But modifying load-file-name should work:
+(let ((new-char ?\\ )
+ old-char)
+ (setq old-char (aref load-file-name 0))
+ (if (= new-char old-char)
+ (setq new-char ?/))
+ (aset load-file-name 0 new-char)
+ (Assert (= new-char (aref load-file-name 0))
+ \"Check that we can modify the string value of load-file-name\"))
+
+(let* ((new-load-file-name \"hi there\")
+ (load-file-name new-load-file-name))
+ (Assert (eq new-load-file-name load-file-name)
+ \"Checking that we can bind load-file-name successfully.\"))
+
+")
+ (write-region (point-min) (point-max) test-file-name nil 'quiet)
+ (set-buffer-modified-p nil)
+ (kill-buffer nil)
+ (load test-file-name nil t nil)
+ (delete-file test-file-name))
+
+
+
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, 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