diff lisp/format.el @ 5270:3acaa0fc09be

Use #'some, #'every, etc. for composing boolean operations on lists. 2010-09-16 Aidan Kehoe <kehoea@parhasard.net> * info.el (Info-insert-dir): * format.el (format-deannotate-region): * files.el (cd, save-buffers-kill-emacs): Use #'some, #'every and related functions for applying boolean operations to lists, instead of rolling our own ones that cons and don't short-circuit.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Sep 2010 15:58:10 +0100
parents 517f6887fbc0
children dbae25a8949d 308d34e9f07d
line wrap: on
line diff
--- a/lisp/format.el	Thu Sep 16 15:34:35 2010 +0100
+++ b/lisp/format.el	Thu Sep 16 15:58:10 2010 +0100
@@ -604,9 +604,8 @@
 			  (if (member top-name ans)
 			      ;; This annotation is listed, but still have to
 			      ;; check if multiple annotations are satisfied
-			      (if (member nil (mapcar (lambda (r)
-							(assoc r open-ans))
-						      ans))
+			      (if (notevery (lambda (r) (assoc r open-ans))
+					    ans)
 				  nil	; multiple ans not satisfied
 				;; If there are multiple annotations going
 				;; into one text property, split up the other