From f91fe6045daa4157db44a7fd11fd91f209778ee6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 3 Jan 1999 15:03:32 +0000 Subject: [PATCH] (find-file-noselect): Let /: suppress wildcard matching. Error if wildcard matches no files. --- lisp/files.el | 3 +++ 1 file changed, 3 insertions(+) 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." 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)) -- 2.39.2