1
Fork 0
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:
Richard M. Stallman 1999-01-03 15:03:32 +00:00
parent ee4976640c
commit f91fe6045d

View file

@ -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))