2 new commits in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/37479d841681/
changeset: 37479d841681
user: stephen_at_xemacs
date: 2012-12-24 06:12:51
summary: Fix subsetp based on patch by Benson and Steven Mitchell.
Add appropriate short-circuits for null set arguments.
Add tests (mostly from Steven Mitchell) to test suite.
affected #: 4 files
diff -r a95c89dc96957f050fd77bd1670674a0da2b3dbe -r
37479d8416810831c38fdf352b5935e29bedf108 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
+2012-12-24 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ Based on patch by Benson and Steven Mitchell on XEmacs Beta
+ <50D16FF7.4090708(a)bnin.net>.
+
+ * sequence.c (venn): Fix bug in handling null arguments.
+ Add null set short circuits, conditional on caller is `subsetp'.
+
2012-10-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* fontcolor-xlike-inc.c (xft_find_charset_font):
diff -r a95c89dc96957f050fd77bd1670674a0da2b3dbe -r
37479d8416810831c38fdf352b5935e29bedf108 src/sequence.c
--- a/src/sequence.c
+++ b/src/sequence.c
@@ -7606,6 +7606,20 @@
CHECK_LIST (liszt2);
CHECK_KEY_ARGUMENT (key);
+
+ /* #### Consider refactoring these tests into callers, and/or optimizing
+ tests. */
+ if (EQ (caller, Qsubsetp))
+ {
+ if (NILP (liszt1))
+ {
+ return Qt;
+ }
+ if (NILP (liszt2))
+ {
+ return Qnil;
+ }
+ }
if (NILP (liszt1) && intersectionp)
{
diff -r a95c89dc96957f050fd77bd1670674a0da2b3dbe -r
37479d8416810831c38fdf352b5935e29bedf108 tests/ChangeLog
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-19 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * automated/lisp-tests.el: Add tests of #'subsetp.
+ Thanks Steven and Benson Mitchell <smitchell(a)bnin.net>.
+
2012-12-14 Mats Lidell <matsl(a)xemacs.org>
* automated/register-tests.el: New. Test for register.el. Test
diff -r a95c89dc96957f050fd77bd1670674a0da2b3dbe -r
37479d8416810831c38fdf352b5935e29bedf108 tests/automated/lisp-tests.el
--- a/tests/automated/lisp-tests.el
+++ b/tests/automated/lisp-tests.el
@@ -2435,6 +2435,23 @@
(gethash hashed-bignum hashing))
"checking hashing works correctly with #'eql tests and bignums"))))
+;; #'subsetp tests.
+;; Return non-nil if every element of LIST1 also appears in LIST2.
+;; A couple of non-nondegenerate false cases.
+(Assert (not (subsetp (list ?a ?b) (list ?c ?d))))
+(Assert (not (subsetp (list ?a ?b) (list ?b ?c ?d))))
+;; Next five thanks to Steven and Benson Mitchell on XEmacs Beta
+;; <50D16FF7.4090708(a)bnin.net>.
+;; Two non-degenerate true cases.
+(Assert (subsetp (list ?a) (list ?a ?b ?c ?d)))
+(Assert (subsetp (list ?a ?b) (list ?a ?b ?c ?d)))
+;; The three degenerate cases involving nil.
+(Assert (not (subsetp (list ?a) nil)))
+(Assert (subsetp nil (list ?a ?b ?c ?d)))
+(Assert (subsetp nil nil))
+;; #### We should also test the keywords.
+;; #### We should also test the error conditions.
+
;;
(when (decode-char 'ucs #x0192)
(Check-Error
https://bitbucket.org/xemacs/xemacs/changeset/ad35a0cd95f5/
changeset: ad35a0cd95f5
user: stephen_at_xemacs
date: 2012-12-24 07:12:52
summary: Allow self-insert-command to be called noninteractively with null argument.
affected #: 2 files
diff -r 37479d8416810831c38fdf352b5935e29bedf108 -r
ad35a0cd95f55ae78abe9f52055a6bf492d1f1a6 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-24 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * cmds.c (Fself_insert_command):
+ Allow noninteractive call with null argument.
+
2012-12-24 Stephen J. Turnbull <stephen(a)xemacs.org>
Based on patch by Benson and Steven Mitchell on XEmacs Beta
diff -r 37479d8416810831c38fdf352b5935e29bedf108 -r
ad35a0cd95f55ae78abe9f52055a6bf492d1f1a6 src/cmds.c
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -332,6 +332,9 @@
Lisp_Object c;
EMACS_INT n;
+ /* It is sometimes useful to specify `self-insert-commmand' in Lisp code.
+ We may as well as all that to be done with default = 1. */
+ count = NILP (count) ? make_int(1) : count;
/* Can't insert more than most-positive-fixnum characters, the buffer
won't hold that many. */
check_integer_range (count, Qzero, make_fixnum (MOST_POSITIVE_FIXNUM));
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches