From: Richard M. Stallman Date: Sat, 11 Sep 1999 21:29:11 +0000 (+0000) Subject: (find-file-noselect): Catch errors in file-expand-wildcards, X-Git-Tag: emacs-pretest-21.0.90~6801 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4adcd90506e21f051c7160296f686031aa5c8188;p=emacs.git (find-file-noselect): Catch errors in file-expand-wildcards, and use the initial argument as file name directly. Likewise if nothing matches. --- diff --git a/lisp/files.el b/lisp/files.el index 272c901432f..ee56e4d3bf2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -940,12 +940,14 @@ that are visiting the various files." 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)))