aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-01-03 15:03:32 +0000
committerRichard M. Stallman1999-01-03 15:03:32 +0000
commitf91fe6045daa4157db44a7fd11fd91f209778ee6 (patch)
tree3c76a7ce678aea53b90321e1b7aec1a3c6c6ced4
parentee4976640cb1d26363449c3e99889e5d2dee2200 (diff)
downloademacs-f91fe6045daa4157db44a7fd11fd91f209778ee6.tar.gz
emacs-f91fe6045daa4157db44a7fd11fd91f209778ee6.zip
(find-file-noselect): Let /: suppress wildcard matching.
Error if wildcard matches no files.
-rw-r--r--lisp/files.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index c4e16fae252..ac9153bc87c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -891,9 +891,12 @@ Optional second arg RAWFILE non-nil means the file is read literally."
891 filename)) 891 filename))
892 (error "%s is a directory" filename)) 892 (error "%s is a directory" filename))
893 (if (and find-file-wildcards 893 (if (and find-file-wildcards
894 (not (string-match "\\`/:" filename))
894 (string-match "[[*?]" filename)) 895 (string-match "[[*?]" filename))
895 (let ((files (file-expand-wildcards filename t)) 896 (let ((files (file-expand-wildcards filename t))
896 (find-file-wildcards nil)) 897 (find-file-wildcards nil))
898 (if (null files)
899 (error "No files match `%s'" filename))
897 (car (mapcar #'(lambda (fn) (find-file-noselect fn)) 900 (car (mapcar #'(lambda (fn) (find-file-noselect fn))
898 files))) 901 files)))
899 (let* ((buf (get-file-buffer filename)) 902 (let* ((buf (get-file-buffer filename))