Commit 4adcd905 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(find-file-noselect): Catch errors in file-expand-wildcards,

and use the initial argument as file name directly.
Likewise if nothing matches.
parent 3331fb06
......@@ -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)))
......
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