Mercurial > hg > xemacs-beta
diff lisp/info.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 | 3ff01259c4a2 |
children | f00192e1cd49 308d34e9f07d |
line wrap: on
line diff
--- a/lisp/info.el Thu Sep 16 15:34:35 2010 +0100 +++ b/lisp/info.el Thu Sep 16 15:58:10 2010 +0100 @@ -864,14 +864,13 @@ (if (and Info-dir-contents Info-dir-file-attributes ;; Verify that none of the files we used has changed ;; since we used it. - (eval (cons 'and - (mapcar #'(lambda (elt) - (let ((curr (file-attributes (car elt)))) - ;; Don't compare the access time. - (if curr (setcar (nthcdr 4 curr) 0)) - (setcar (nthcdr 4 (cdr elt)) 0) - (equal (cdr elt) curr))) - Info-dir-file-attributes)))) + (every #'(lambda (elt) + (let ((curr (file-attributes (car elt)))) + ;; Don't compare the access time. + (if curr (setcar (nthcdr 4 curr) 0)) + (setcar (nthcdr 4 (cdr elt)) 0) + (equal (cdr elt) curr))) + Info-dir-file-attributes)) (insert Info-dir-contents) (let ((dirs (reverse Info-directory-list)) buffers lbuffers buffer others nodes dirs-done)