APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1293665918 0
# Node ID f6471e4ae703ecb5f712c9dfcaabdc2a15f3bd65
# Parent 07d24b1f27a772c318f96263b8699cc21283d8a8
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)
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches