Romain Francoise writes: > michael@cadilhac.name (Michaël Cadilhac) writes: > > + (defun battery-search-for-one-match-in-files (files regexp match-num) > + "Search REGEXP in content of the files listed in FILES. > + If a match occured, return the parenthesized expression numbered by > + MATCH-NUM in the match. Otherwise, return nil." > + (with-temp-buffer > + (while (and files > + (not (or (ignore-errors > + (insert-file-contents (car files)) > + (re-search-forward regexp)) > + (erase-buffer)))) > + (setq files (cdr files))) > + (when files > + (match-string match-num)))) > > Since battery.el requires cl at compilation time, you can safely use > `dolist'... You're right, it'd enhance the readability of the code. Please consider this (hopefully) final version.