changeset: 5312:f6471e4ae703
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Dec 29 23:38:38 2010 +0000
files: lisp/ChangeLog lisp/cl-extra.el
description:
Avoid some dynamic scope stupidity in interpreted code, #'notany, #'notevery.
2010-12-29 Aidan Kehoe <kehoea(a)parhasard.net>
* cl-extra.el (notany, notevery): Avoid some dynamic scope
stupidity with local variable names in these functions, when they
weren't prefixed with cl-; go into some more detail in the doc
strings.
diff -r 07d24b1f27a7 -r f6471e4ae703 lisp/ChangeLog
--- a/lisp/ChangeLog Wed Dec 29 23:25:52 2010 +0000
+++ b/lisp/ChangeLog Wed Dec 29 23:38:38 2010 +0000
@@ -1,3 +1,10 @@
+2010-12-29 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * cl-extra.el (notany, notevery): Avoid some dynamic scope
+ stupidity with local variable names in these functions, when they
+ weren't prefixed with cl-; go into some more detail in the doc
+ strings.
+
2010-12-29 Aidan Kehoe <kehoea(a)parhasard.net>
* byte-optimize.el (side-effect-free-fns): #'remove, #'remq are
diff -r 07d24b1f27a7 -r f6471e4ae703 lisp/cl-extra.el
--- a/lisp/cl-extra.el Wed Dec 29 23:25:52 2010 +0000
+++ b/lisp/cl-extra.el Wed Dec 29 23:38:38 2010 +0000
@@ -128,13 +128,23 @@
`(lambda (&rest arguments) ,@(if documentation (list documentation))
(not (apply ',function arguments))))
-(defun notany (cl-pred cl-seq &rest cl-rest)
- "Return true if PREDICATE is false of every element of SEQ or SEQs."
- (not (apply 'some cl-pred cl-seq cl-rest)))
+(defun notany (cl-predicate cl-seq &rest cl-rest)
+ "Return true if PREDICATE is false of every element of SEQUENCE.
-(defun notevery (cl-pred cl-seq &rest cl-rest)
- "Return true if PREDICATE is false of some element of SEQ or SEQs."
- (not (apply 'every cl-pred cl-seq cl-rest)))
+With optional SEQUENCES, call PREDICATE each time with as many arguments as
+there are SEQUENCES (plus one for the element from SEQUENCE).
+
+arguments: (PREDICATE SEQUENCES &rest SEQUENCES)"
+ (not (apply 'some cl-predicate cl-seq cl-rest)))
+
+(defun notevery (cl-predicate cl-seq &rest cl-rest)
+ "Return true if PREDICATE is false of some element of SEQUENCE.
+
+With optional SEQUENCES, call PREDICATE each time with as many arguments as
+there are SEQUENCES (plus one for the element from SEQUENCE).
+
+arguments: (PREDICATE SEQUENCES &rest SEQUENCES)"
+ (not (apply 'every cl-predicate cl-seq cl-rest)))
;;; Support for `loop'.
(defalias 'cl-map-keymap 'map-keymap)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches