From: Richard M. Stallman Date: Thu, 28 Jul 1994 12:53:30 +0000 (+0000) Subject: (Info-find-node): Use a loop instead of mapcar and catch. X-Git-Tag: emacs-19.34~7484 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=35d4f4e8e421a952e8e774efe2729b9978792f56;p=emacs.git (Info-find-node): Use a loop instead of mapcar and catch. --- 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-exit] exits Emacs itself." (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)