# HG changeset patch # User Richard M. Stallman # Date 937085351 0 # Node ID 952461b8fdafa62a29f5939a46e8cc8f48bad8ea # Parent 69c2d34eb25c4dc25d2ec5b2999483f7ca86c31b (find-file-noselect): Catch errors in file-expand-wildcards, and use the initial argument as file name directly. Likewise if nothing matches. diff -r 69c2d34eb25c -r 952461b8fdaf lisp/files.el --- a/lisp/files.el Sat Sep 11 20:42:47 1999 +0000 +++ b/lisp/files.el Sat Sep 11 21:29:11 1999 +0000 @@ -940,12 +940,14 @@ find-file-wildcards (not (string-match "\\`/:" filename)) (string-match "[[*?]" filename)) - (let ((files (file-expand-wildcards filename t)) + (let ((files (condition-case nil + (file-expand-wildcards filename t) + (error (list filename)))) (find-file-wildcards nil)) (if (null files) - (error "No files match `%s'" filename)) - (mapcar #'(lambda (fn) (find-file-noselect fn)) - files)) + (find-file-noselect filename) + (car (mapcar #'(lambda (fn) (find-file-noselect fn)) + files)))) (let* ((buf (get-file-buffer filename)) (truename (abbreviate-file-name (file-truename filename))) (number (nthcdr 10 (file-attributes truename)))