carbon2-commit: Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs
16 years, 11 months
Aidan Kehoe
changeset: 4416:e70cc8a90e9043075a0e40fe9587d2c931fb618e
parent: 4415:01970033faa65b61e6fdd252967bccf4bbac491c
parent: 4414:555e21a66d51b966860fc9a82a4e6a1cf40a78fe
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jan 17 11:55:11 2008 +0100
files:
description:
Automated merge with ssh://aidan-guest@hg.debian.org//hg/xemacs/xemacs
diff -r 01970033faa65b61e6fdd252967bccf4bbac491c -r e70cc8a90e9043075a0e40fe9587d2c931fb618e lisp/ChangeLog
--- a/lisp/ChangeLog Thu Jan 17 11:52:45 2008 +0100
+++ b/lisp/ChangeLog Thu Jan 17 11:55:11 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-16 Aidan Kehoe <kehoea@parhasa
+2008-01-17 Mike Sperber <mike(a)xemacs.org>
+
+ * 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 <kehoea(a)parhasard.net>
* keydefs.el (global-map):
diff -r 01970033faa65b61e6fdd252967bccf4bbac491c -r e70cc8a90e9043075a0e40fe9587d2c931fb618e lisp/files.el
--- a/lisp/files.el Thu Jan 17 11:52:45 2008 +0100
+++ b/lisp/files.el Thu Jan 17 11:55:11 2008 +0100
@@ -4177,6 +4177,9 @@ If WILDCARD, it also runs the shell spec
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.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Configure fixes from Hans de Graaff, as used in Gentoo.
16 years, 11 months
Aidan Kehoe
changeset: 4415:01970033faa65b61e6fdd252967bccf4bbac491c
parent: 4413:e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jan 17 11:52:45 2008 +0100
files: ChangeLog configure configure.ac
description:
Configure fixes from Hans de Graaff, as used in Gentoo.
2008-01-17 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.
diff -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db -r 01970033faa65b61e6fdd252967bccf4bbac491c ChangeLog
--- a/ChangeLog Wed Jan 16 15:43:01 2008 +0100
+++ b/ChangeLog Thu Jan 17 11:52:45 2008 +0100
@@ -1,3 +1,17 @@ 2008-01-01 Stephen J. Turnbull <stephe
+2008-01-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <stephen(a)xemacs.org>
* Makefile.in.in (mkpkgdir): Fix incorrect comment convention.
diff -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db -r 01970033faa65b61e6fdd252967bccf4bbac491c configure
--- a/configure Wed Jan 16 15:43:01 2008 +0100
+++ b/configure Thu Jan 17 11:52:45 2008 +0100
@@ -37246,10 +37246,79 @@ if test $ac_cv_lib_gdbm_dbm_open = yes;
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
@@ -37902,7 +37971,7 @@ fi
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
diff -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db -r 01970033faa65b61e6fdd252967bccf4bbac491c configure.ac
--- a/configure.ac Wed Jan 16 15:43:01 2008 +0100
+++ b/configure.ac Thu Jan 17 11:52:45 2008 +0100
@@ -5408,10 +5408,13 @@ if test "$enable_database_gdbm" != "no";
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.
@@ -5492,7 +5495,7 @@ yes
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
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: 2008-01-13 Michael Sperber <mike@xemacs.org>
16 years, 11 months
Aidan Kehoe
changeset: 4414:555e21a66d51b966860fc9a82a4e6a1cf40a78fe
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Thu Jan 17 10:18:05 2008 +0100
files: lisp/ChangeLog lisp/files.el
description:
2008-01-13 Michael Sperber <mike(a)xemacs.org>
* files.el (insert-directory): Bind `coding-system-for-read'
according to the current locale where available. (Previously, the
default ended up being undecided, which doesn't work well for
UTF-8-based locales, for example.)
diff -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db -r 555e21a66d51b966860fc9a82a4e6a1cf40a78fe lisp/ChangeLog
--- a/lisp/ChangeLog Wed Jan 16 15:43:01 2008 +0100
+++ b/lisp/ChangeLog Thu Jan 17 10:18:05 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-16 Aidan Kehoe <kehoea@parhasa
+2008-01-17 Mike Sperber <mike(a)xemacs.org>
+
+ * 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 <kehoea(a)parhasard.net>
* keydefs.el (global-map):
diff -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db -r 555e21a66d51b966860fc9a82a4e6a1cf40a78fe lisp/files.el
--- a/lisp/files.el Wed Jan 16 15:43:01 2008 +0100
+++ b/lisp/files.el Thu Jan 17 10:18:05 2008 +0100
@@ -4177,6 +4177,9 @@ If WILDCARD, it also runs the shell spec
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.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Call #'make-temp-file in mule-tests.el, now it's available.
16 years, 11 months
Aidan Kehoe
changeset: 4413:e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jan 16 15:43:01 2008 +0100
files: tests/ChangeLog tests/automated/mule-tests.el
description:
Call #'make-temp-file in mule-tests.el, now it's available.
2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.
diff -r 479443c0f95a6291466173eb0254f61681654c9c -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db tests/ChangeLog
--- a/tests/ChangeLog Wed Jan 16 15:20:51 2008 +0100
+++ b/tests/ChangeLog Wed Jan 16 15:43:01 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-16 Aidan Kehoe <kehoea@parhasa
+2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* automated/hash-table-tests.el:
diff -r 479443c0f95a6291466173eb0254f61681654c9c -r e5b3c4dbc8a2a2c9c86f8d6e8b606a09033415db tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Wed Jan 16 15:20:51 2008 +0100
+++ b/tests/automated/mule-tests.el Wed Jan 16 15:43:01 2008 +0100
@@ -118,21 +118,8 @@ This is a naive implementation in Lisp.
;; Fixed 2007-06-22 <18043.2793.611745.734215(a)parhasard.net>.
;;----------------------------------------------------------------
-(let ((test-file-name
- ;; The Gnus people, when they call #'make-temp-name, then loop,
- ;; checking if the corresponding file exists. Our #'make-temp-name
- ;; already does this loop, and the Gnus approach doesn't bring
- ;; anything; there remains a race condition if you can predict the
- ;; path name. The path name in question depends on the process ID and
- ;; a (weak) PRNG seeded with the seconds to the power of the
- ;; milliseconds of some instant close to the startup time of this
- ;; XEmacs; without being able to read the address space of this
- ;; XEmacs, or monitor what stat() calls it does, it is not predictable.
- ;;
- ;; The really kosher way to do this is to merge GNU's make-temp-file
- ;; and use that. It basically has the functionality of the Unix
- ;; mkstemp.
- (make-temp-name (expand-file-name "tXfXsKc" (temp-directory))))
+(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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Bind '(shift delete) to #'kill-primary-selection by default.
16 years, 11 months
Aidan Kehoe
changeset: 4411:9e28067e3083ce90cdd48370cd9f7947862681f9
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jan 16 00:19:59 2008 +0100
files: lisp/ChangeLog lisp/keydefs.el
description:
Bind '(shift delete) to #'kill-primary-selection by default.
2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* keydefs.el (global-map):
Bind '(shift delete) to #'kill-primary-selection, as described by
Glynn Clements in
16434.49191.47038.991206(a)cerise.nosuchdomain.co.uk of 2004-02-08.
diff -r e97f16fb2e2584470e54cd36c7f17eaff95c06a4 -r 9e28067e3083ce90cdd48370cd9f7947862681f9 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Jan 15 22:59:28 2008 +0100
+++ b/lisp/ChangeLog Wed Jan 16 00:19:59 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-14 Jerry James <james(a)xemacs.o
+2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * keydefs.el (global-map):
+ Bind '(shift delete) to #'kill-primary-selection, as described by
+ Glynn Clements in
+ 16434.49191.47038.991206(a)cerise.nosuchdomain.co.uk of 2004-02-08.
+
2008-01-14 Jerry James <james(a)xemacs.org>
* font-lock.el (font-lock-add-keywords): Adapt to differences in
diff -r e97f16fb2e2584470e54cd36c7f17eaff95c06a4 -r 9e28067e3083ce90cdd48370cd9f7947862681f9 lisp/keydefs.el
--- a/lisp/keydefs.el Tue Jan 15 22:59:28 2008 +0100
+++ b/lisp/keydefs.el Wed Jan 16 00:19:59 2008 +0100
@@ -620,11 +620,15 @@ Keymap for characters following C-c.")
(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)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Have list hashes depend on the order of the contents, as is the case for vectors.
16 years, 11 months
Aidan Kehoe
changeset: 4412:479443c0f95a6291466173eb0254f61681654c9c
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jan 16 15:20:51 2008 +0100
files: src/ChangeLog src/elhash.c tests/ChangeLog tests/automated/hash-table-tests.el
description:
Have list hashes depend on the order of the contents, as is the case for vectors.
src/ChangeLog addition:
2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* 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!
tests/ChangeLog addition:
2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/hash-table-tests.el:
Assert that two short lists with the same contents in distinct
orders hash differently.
diff -r 9e28067e3083ce90cdd48370cd9f7947862681f9 -r 479443c0f95a6291466173eb0254f61681654c9c src/ChangeLog
--- a/src/ChangeLog Wed Jan 16 00:19:59 2008 +0100
+++ b/src/ChangeLog Wed Jan 16 15:20:51 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-15 Aidan Kehoe <kehoea@parhasa
+2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* print.c (prin1_to_string): New.
diff -r 9e28067e3083ce90cdd48370cd9f7947862681f9 -r 479443c0f95a6291466173eb0254f61681654c9c src/elhash.c
--- a/src/elhash.c Wed Jan 16 00:19:59 2008 +0100
+++ b/src/elhash.c Wed Jan 16 15:20:51 2008 +0100
@@ -1719,12 +1719,33 @@ internal_hash (Lisp_Object obj, int dept
{
if (depth > 5)
return 0;
- 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));
+
+ if (CONSP(obj))
+ {
+ 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 9e28067e3083ce90cdd48370cd9f7947862681f9 -r 479443c0f95a6291466173eb0254f61681654c9c tests/ChangeLog
--- a/tests/ChangeLog Wed Jan 16 00:19:59 2008 +0100
+++ b/tests/ChangeLog Wed Jan 16 15:20:51 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-15 Aidan Kehoe <kehoea@parhasa
+2008-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/hash-table-tests.el:
+ Assert that two short lists with the same contents in distinct
+ orders hash differently.
+
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (literal-with-uninterned):
diff -r 9e28067e3083ce90cdd48370cd9f7947862681f9 -r 479443c0f95a6291466173eb0254f61681654c9c tests/automated/hash-table-tests.el
--- a/tests/automated/hash-table-tests.el Wed Jan 16 00:19:59 2008 +0100
+++ b/tests/automated/hash-table-tests.el Wed Jan 16 15:20:51 2008 +0100
@@ -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))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Don't assume lisp-tests.el will be correctly read as UTF-8.
16 years, 11 months
Aidan Kehoe
changeset: 4410:e97f16fb2e2584470e54cd36c7f17eaff95c06a4
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 15 22:59:28 2008 +0100
files: tests/ChangeLog tests/automated/lisp-tests.el
description:
Don't assume lisp-tests.el will be correctly read as UTF-8.
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.
diff -r b03b5e362fcff61ac4632834ea16615407c1264b -r e97f16fb2e2584470e54cd36c7f17eaff95c06a4 tests/ChangeLog
--- a/tests/ChangeLog Tue Jan 15 21:35:41 2008 +0100
+++ b/tests/ChangeLog Tue Jan 15 22:59:28 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-15 Aidan Kehoe <kehoea@parhasa
+2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* automated/lisp-tests.el (thing):
diff -r b03b5e362fcff61ac4632834ea16615407c1264b -r e97f16fb2e2584470e54cd36c7f17eaff95c06a4 tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Tue Jan 15 21:35:41 2008 +0100
+++ b/tests/automated/lisp-tests.el Tue Jan 15 22:59:28 2008 +0100
@@ -1303,7 +1303,7 @@
(let* ((literal-with-uninterned
'(first-element
[#1=#:G32976 #2=#:G32974 #3=#:G32971 #4=#:G32969 alias
- #s(hash-table size 256 data (969 ?ù 55 ?7 166 ?¦ ))
+ #s(hash-table size 256 data (969 ?\xF9 55 ?7 166 ?\xA6))
#5=#:G32970 #6=#:G32972]))
(print-readably t)
(print-gensym t)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Automated merge with file:/Sources/xemacs-21.5-checked-out
16 years, 11 months
Aidan Kehoe
changeset: 4409:b03b5e362fcff61ac4632834ea16615407c1264b
parent: 4408:cacc942c0d0ff698ddad402df54e0fed35425b09
parent: 4407:f6c39b2d8b6227405501091559be63ca54161c31
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 15 21:35:41 2008 +0100
files:
description:
Automated merge with file:/Sources/xemacs-21.5-checked-out
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/ChangeLog
--- a/lisp/ChangeLog Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/ChangeLog Tue Jan 15 21:35:41 2008 +0100
@@ -1,3 +1,17 @@ 2008-01-04 Michael Sperber <mike@xemac
+2008-01-14 Jerry James <james(a)xemacs.org>
+
+ * 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 <kehoea(a)parhasard.net>
+
+ * 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 <mike(a)xemacs.org>
* code-files.el (insert-file-contents):
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/bytecomp.el
--- a/lisp/bytecomp.el Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/bytecomp.el Tue Jan 15 21:35:41 2008 +0100
@@ -1888,7 +1888,8 @@ With argument, insert value in current b
(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)))
diff -r cacc942c0d0ff698ddad402df54e0fed35425b09 -r b03b5e362fcff61ac4632834ea16615407c1264b lisp/font-lock.el
--- a/lisp/font-lock.el Tue Jan 15 21:35:01 2008 +0100
+++ b/lisp/font-lock.el Tue Jan 15 21:35:41 2008 +0100
@@ -959,7 +959,7 @@ see the variables `c-font-lock-extra-typ
(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)
@@ -1069,7 +1069,7 @@ happens, so the major mode can be correc
(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))
@@ -2031,7 +2031,10 @@ Each keyword has the form (MATCHER HIGHL
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)
@@ -2096,7 +2099,14 @@ Each keyword has the form (MATCHER HIGHL
;; 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)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Avoid clearing print-gensym-alist inappropriately when printing hash tables.
16 years, 11 months
Aidan Kehoe
changeset: 4408:cacc942c0d0ff698ddad402df54e0fed35425b09
parent: 4405:cbf129b005dff4258c4651fefb80e646940d82f7
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Jan 15 21:35:01 2008 +0100
files: src/ChangeLog src/doprnt.c src/lisp.h src/print.c tests/ChangeLog tests/automated/lisp-tests.el
description:
Avoid clearing print-gensym-alist inappropriately when printing hash tables.
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/lisp-tests.el (thing):
Check that printing a hash table literal doesn't clear
print-gensym-alist.
2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
* 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.
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/ChangeLog
--- a/src/ChangeLog Sat Jan 12 18:04:13 2008 +0100
+++ b/src/ChangeLog Tue Jan 15 21:35:01 2008 +0100
@@ -1,3 +1,14 @@ 2008-01-12 Aidan Kehoe <kehoea@parhasa
+2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * 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 <kehoea(a)parhasard.net>
* rangetab.c (Fmap_range_table):
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/doprnt.c
--- a/src/doprnt.c Sat Jan 12 18:04:13 2008 +0100
+++ b/src/doprnt.c Tue Jan 15 21:35:01 2008 +0100
@@ -558,7 +558,7 @@ emacs_doprnt_1 (Lisp_Object stream, cons
{
/* 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 @@ emacs_doprnt_1 (Lisp_Object stream, cons
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);
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/lisp.h
--- a/src/lisp.h Sat Jan 12 18:04:13 2008 +0100
+++ b/src/lisp.h Tue Jan 15 21:35:01 2008 +0100
@@ -4932,6 +4932,7 @@ EXFUN (Fprinc, 2);
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);
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 src/print.c
--- a/src/print.c Sat Jan 12 18:04:13 2008 +0100
+++ b/src/print.c Tue Jan 15 21:35:01 2008 +0100
@@ -867,6 +867,26 @@ Output stream is STREAM, or value of `st
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 @@ second argument NOESCAPE is non-nil.
{
/* 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;
}
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 tests/ChangeLog
--- a/tests/ChangeLog Sat Jan 12 18:04:13 2008 +0100
+++ b/tests/ChangeLog Tue Jan 15 21:35:01 2008 +0100
@@ -1,3 +1,9 @@ 2008-01-03 Stephen J. Turnbull <stephe
+2008-01-15 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/lisp-tests.el (thing):
+ Check that printing a hash table literal doesn't clear
+ print-gensym-alist.
+
2008-01-03 Stephen J. Turnbull <stephen(a)xemacs.org>
* automated/symbol-tests.el (Symbol documentation): Add tests to
diff -r cbf129b005dff4258c4651fefb80e646940d82f7 -r cacc942c0d0ff698ddad402df54e0fed35425b09 tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el Sat Jan 12 18:04:13 2008 +0100
+++ b/tests/automated/lisp-tests.el Tue Jan 15 21:35:01 2008 +0100
@@ -1299,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 ?ù 55 ?7 166 ?¦ ))
+ #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)))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Make font-lock-{add, remove}-keywords actually work.
16 years, 11 months
Aidan Kehoe
changeset: 4407:f6c39b2d8b6227405501091559be63ca54161c31
user: Jerry James <james(a)xemacs.org>
date: Mon Jan 14 16:50:32 2008 -0700
files: lisp/ChangeLog lisp/font-lock.el
description:
Make font-lock-{add,remove}-keywords actually work.
2008-01-14 Jerry James <james(a)xemacs.org>
* 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.
diff -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d -r f6c39b2d8b6227405501091559be63ca54161c31 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Jan 14 15:25:22 2008 +0100
+++ b/lisp/ChangeLog Mon Jan 14 16:50:32 2008 -0700
@@ -1,3 +1,11 @@ 2008-01-14 Aidan Kehoe <kehoea@parhasa
+2008-01-14 Jerry James <james(a)xemacs.org>
+
+ * 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 <kehoea(a)parhasard.net>
* bytecomp.el (byte-compile-output-file-form):
diff -r e8f448f997ac016c496451fbb54fff6e4b6e4f9d -r f6c39b2d8b6227405501091559be63ca54161c31 lisp/font-lock.el
--- a/lisp/font-lock.el Mon Jan 14 15:25:22 2008 +0100
+++ b/lisp/font-lock.el Mon Jan 14 16:50:32 2008 -0700
@@ -959,7 +959,7 @@ see the variables `c-font-lock-extra-typ
(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)
@@ -1069,7 +1069,7 @@ happens, so the major mode can be correc
(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))
@@ -2031,7 +2031,10 @@ Each keyword has the form (MATCHER HIGHL
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)
@@ -2096,7 +2099,14 @@ Each keyword has the form (MATCHER HIGHL
;; 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)))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches