Mercurial > emacs
changeset 8369:c10b35194993
(Info-find-node): Use a loop instead of mapcar and catch.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 28 Jul 1994 12:53:30 +0000 |
parents | 0c30bec316c6 |
children | 97cacab659d3 |
files | lisp/info.el |
diffstat | 1 files changed, 9 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/info.el Thu Jul 28 12:50:34 1994 +0000 +++ b/lisp/info.el Thu Jul 28 12:53:30 1994 +0000 @@ -214,19 +214,15 @@ (setq temp-downcase (expand-file-name (downcase filename) (car dirs))) ;; Try several variants of specified name. - (catch 'foundit - (mapcar - (function - (lambda (x) - (if (file-exists-p (concat temp (car x))) - (progn - (setq found temp) - (throw 'foundit nil))) - (if (file-exists-p (concat temp-downcase (car x))) - (progn - (setq found temp-downcase) - (throw 'foundit nil))))) - Info-suffix-list)) + (let ((suffix-list Info-suffix-list)) + (while (and suffix-list (not found)) + (cond ((file-exists-p + (concat temp (car (car suffix-list)))) + (setq found temp)) + ((file-exists-p + (concat temp-downcase (car (car suffix-list)))) + (setq found temp-downcase))) + (setq suffix-list (cdr suffix-list)))) (setq dirs (cdr dirs))))) (if found (setq filename found)