mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(find-file-noselect): Let /: suppress wildcard matching.
Error if wildcard matches no files.
This commit is contained in:
parent
ee4976640c
commit
f91fe6045d
1 changed files with 3 additions and 0 deletions
|
|
@ -891,9 +891,12 @@ Optional second arg RAWFILE non-nil means the file is read literally."
|
|||
filename))
|
||||
(error "%s is a directory" filename))
|
||||
(if (and find-file-wildcards
|
||||
(not (string-match "\\`/:" filename))
|
||||
(string-match "[[*?]" filename))
|
||||
(let ((files (file-expand-wildcards filename t))
|
||||
(find-file-wildcards nil))
|
||||
(if (null files)
|
||||
(error "No files match `%s'" filename))
|
||||
(car (mapcar #'(lambda (fn) (find-file-noselect fn))
|
||||
files)))
|
||||
(let* ((buf (get-file-buffer filename))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue