# HG changeset patch # User Richard M. Stallman # Date 895205156 0 # Node ID 5665490a6f9ee043a47474831f4f0f8eb483c2c0 # Parent a09f2b697d0ab17c6aa13b3b94478dbd604e8852 (Info-find-node): Use info-file-exists-p (info-insert-file-contents): Use info-file-exists-p. (info-file-exists-p): New function. diff -r a09f2b697d0a -r 5665490a6f9e lisp/info.el --- a/lisp/info.el Fri May 15 00:34:07 1998 +0000 +++ b/lisp/info.el Fri May 15 04:05:56 1998 +0000 @@ -228,6 +228,10 @@ (- ext-len ext-left))) suffix)))) +(defun info-file-exists-p (filename) + (and (file-exists-p filename) + (not (file-directory-p filename)))) + (defun info-insert-file-contents (filename &optional visit) "Insert the contents of an info file in the current buffer. Do the right thing if the file has been compressed or zipped." @@ -246,8 +250,8 @@ decoder (cdr (car tail)))) ;; Try adding suffixes to FILENAME and see if we can find something. (while (and tail - (not (file-exists-p (info-insert-file-contents-1 - filename (car (car tail)))))) + (not (info-file-exists-p (info-insert-file-contents-1 + filename (car (car tail)))))) (setq tail (cdr tail))) ;; If we found a file with a suffix, set DECODER according to the suffix ;; and set FULLNAME to the file's actual name. @@ -342,11 +346,11 @@ ;; Try several variants of specified name. (let ((suffix-list Info-suffix-list)) (while (and suffix-list (not found)) - (cond ((file-exists-p + (cond ((info-file-exists-p (info-insert-file-contents-1 temp (car (car suffix-list)))) (setq found temp)) - ((file-exists-p + ((info-file-exists-p (info-insert-file-contents-1 temp-downcase (car (car suffix-list)))) (setq found temp-downcase)))