Commit 35d4f4e8 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Info-find-node): Use a loop instead of mapcar and catch.

parent f8b53a82
......@@ -214,19 +214,15 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(setq temp-downcase
(expand-file-name (downcase filename) (car dirs)))
;; Try several variants of specified name.
(catch 'foundit
(lambda (x)
(if (file-exists-p (concat temp (car x)))
(setq found temp)
(throw 'foundit nil)))
(if (file-exists-p (concat temp-downcase (car x)))
(setq found temp-downcase)
(throw 'foundit nil)))))
(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))
(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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment