aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-28 12:53:30 +0000
committerRichard M. Stallman1994-07-28 12:53:30 +0000
commit35d4f4e8e421a952e8e774efe2729b9978792f56 (patch)
treea303006361a333df11c91efb9f4be96a7ae13911 /lisp
parentf8b53a822ca9799742eaa119b0dfef2d1b1c9817 (diff)
downloademacs-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.el22
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)