diff options
| author | Richard M. Stallman | 1994-07-28 12:53:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-28 12:53:30 +0000 |
| commit | 35d4f4e8e421a952e8e774efe2729b9978792f56 (patch) | |
| tree | a303006361a333df11c91efb9f4be96a7ae13911 /lisp | |
| parent | f8b53a822ca9799742eaa119b0dfef2d1b1c9817 (diff) | |
| download | emacs-35d4f4e8e421a952e8e774efe2729b9978792f56.tar.gz emacs-35d4f4e8e421a952e8e774efe2729b9978792f56.zip | |
(Info-find-node): Use a loop instead of mapcar and catch.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/info.el | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lisp/info.el b/lisp/info.el index a86d718bd22..e58e099ef32 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -214,19 +214,15 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." | |||
| 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) |