Mercurial > emacs
comparison lisp/info.el @ 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 | 0be48d0d16fd |
children | c88361c3b940 |
comparison
equal
deleted
inserted
replaced
8368:0c30bec316c6 | 8369:c10b35194993 |
---|---|
212 (while (and dirs (not found)) | 212 (while (and dirs (not found)) |
213 (setq temp (expand-file-name filename (car dirs))) | 213 (setq temp (expand-file-name filename (car dirs))) |
214 (setq temp-downcase | 214 (setq temp-downcase |
215 (expand-file-name (downcase filename) (car dirs))) | 215 (expand-file-name (downcase filename) (car dirs))) |
216 ;; Try several variants of specified name. | 216 ;; Try several variants of specified name. |
217 (catch 'foundit | 217 (let ((suffix-list Info-suffix-list)) |
218 (mapcar | 218 (while (and suffix-list (not found)) |
219 (function | 219 (cond ((file-exists-p |
220 (lambda (x) | 220 (concat temp (car (car suffix-list)))) |
221 (if (file-exists-p (concat temp (car x))) | 221 (setq found temp)) |
222 (progn | 222 ((file-exists-p |
223 (setq found temp) | 223 (concat temp-downcase (car (car suffix-list)))) |
224 (throw 'foundit nil))) | 224 (setq found temp-downcase))) |
225 (if (file-exists-p (concat temp-downcase (car x))) | 225 (setq suffix-list (cdr suffix-list)))) |
226 (progn | |
227 (setq found temp-downcase) | |
228 (throw 'foundit nil))))) | |
229 Info-suffix-list)) | |
230 (setq dirs (cdr dirs))))) | 226 (setq dirs (cdr dirs))))) |
231 (if found | 227 (if found |
232 (setq filename found) | 228 (setq filename found) |
233 (error "Info file %s does not exist" filename)))) | 229 (error "Info file %s does not exist" filename)))) |
234 ;; Record the node we are leaving. | 230 ;; Record the node we are leaving. |